[vm/concurrency] Enable field unboxing optimization in lightweight isolate configuration.

With f3520ff11bbee30233cdff582abaaa7df7afad8e landed it is safe to enable
field unboxing for lightweight isolates.

TEST=ci

Issue https://github.com/dart-lang/sdk/issues/36097

Change-Id: I4fcac2370435408f875a6f3a47f69bfb136ae07d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196023
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler.cc b/runtime/vm/compiler/backend/flow_graph_compiler.cc
index da51b20..e2a8d34 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler.cc
@@ -207,9 +207,7 @@
   // The `field.is_non_nullable_integer()` is set in the kernel loader and can
   // only be set if we consume a AOT kernel (annotated with inferred types).
   ASSERT(!field.is_non_nullable_integer() || FLAG_precompiled_mode);
-  // Unboxed fields in JIT lightweight isolates mode are not supported yet.
   const bool valid_class =
-      (FLAG_precompiled_mode || !IsolateGroup::AreIsolateGroupsEnabled()) &&
       ((SupportsUnboxedDoubles() && (field.guarded_cid() == kDoubleCid)) ||
        (SupportsUnboxedSimd128() && (field.guarded_cid() == kFloat32x4Cid)) ||
        (SupportsUnboxedSimd128() && (field.guarded_cid() == kFloat64x2Cid)) ||
@@ -224,9 +222,7 @@
     // proven to be correct.
     return IsUnboxedField(field);
   }
-  // Unboxed fields in JIT lightweight isolates mode are not supported yet.
-  return !IsolateGroup::AreIsolateGroupsEnabled() &&
-         field.is_unboxing_candidate() &&
+  return field.is_unboxing_candidate() &&
          (FlowGraphCompiler::IsUnboxedField(field) ||
           (field.guarded_cid() == kIllegalCid));
 }
@@ -449,7 +445,7 @@
 void FlowGraphCompiler::RecordCatchEntryMoves(Environment* env,
                                               intptr_t try_index) {
 #if defined(DART_PRECOMPILER)
-  env = env ? env : pending_deoptimization_env_;
+  env = env != nullptr ? env : pending_deoptimization_env_;
   try_index = try_index != kInvalidTryIndex ? try_index : CurrentTryIndex();
   if (is_optimizing() && env != nullptr && (try_index != kInvalidTryIndex)) {
     env = env->Outermost();