diff --git a/shell/platform/android/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorView.java b/shell/platform/android/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorView.java index fd9be7a86235a..d46f5346d7ab3 100644 --- a/shell/platform/android/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorView.java +++ b/shell/platform/android/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorView.java @@ -6,7 +6,6 @@ import android.content.Context; import android.graphics.Canvas; import android.graphics.Matrix; -import android.graphics.Paint; import android.graphics.Path; import android.view.MotionEvent; import android.view.View; @@ -29,7 +28,6 @@ public class FlutterMutatorView extends FrameLayout { private int top; private int prevLeft; private int prevTop; - private Paint paint; private final AndroidTouchProcessor androidTouchProcessor; @@ -44,7 +42,6 @@ public FlutterMutatorView( super(context, null); this.screenDensity = screenDensity; this.androidTouchProcessor = androidTouchProcessor; - this.paint = new Paint(); } /** Initialize the FlutterMutatorView. */ @@ -145,11 +142,6 @@ public void draw(Canvas canvas) { pathCopy.offset(-left, -top); canvas.clipPath(pathCopy); } - - // Apply the final opacity value on the parent canvas. - paint.setAlpha((int) (mutatorsStack.getFinalOpacity() * 255)); - this.setLayerType(LAYER_TYPE_HARDWARE, paint); - super.draw(canvas); canvas.restore(); } diff --git a/shell/platform/android/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorsStack.java b/shell/platform/android/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorsStack.java index 6fad699c7f7a1..f7c8b3ee9d0e0 100644 --- a/shell/platform/android/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorsStack.java +++ b/shell/platform/android/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorsStack.java @@ -47,7 +47,6 @@ public class FlutterMutator { @Nullable private Rect rect; @Nullable private Path path; @Nullable private float[] radiis; - @Nullable private float opacity; private FlutterMutatorType type; @@ -94,16 +93,6 @@ public FlutterMutator(Matrix matrix) { this.matrix = matrix; } - /** - * Initialize an opacity mutator. - * - * @param opacity the opacity to apply. - */ - public FlutterMutator(float opacity) { - this.type = FlutterMutatorType.OPACITY; - this.opacity = opacity; - } - /** * Get the mutator type. * @@ -139,29 +128,18 @@ public Path getPath() { public Matrix getMatrix() { return matrix; } - - /** - * Get the opacity of the mutator if {@link #getType()} returns FlutterMutatorType.OPACITY. - * - * @return the opacity if the type is FlutterMutatorType.OPACITY; otherwise null. - */ - public float getOpacity() { - return opacity; - } } private @NonNull List mutators; private List finalClippingPaths; private Matrix finalMatrix; - private float finalOpacity; /** Initialize the mutator stack. */ public FlutterMutatorsStack() { this.mutators = new ArrayList(); finalMatrix = new Matrix(); finalClippingPaths = new ArrayList(); - finalOpacity = 1.f; } /** @@ -209,17 +187,6 @@ public void pushClipRRect(int left, int top, int right, int bottom, float[] radi finalClippingPaths.add(path); } - /** - * Push an opacity {@link FlutterMutatorsStack.FlutterMutator} to the stack. - * - * @param opacity the opacity value. - */ - public void pushOpacity(float opacity) { - FlutterMutator mutator = new FlutterMutator(opacity); - mutators.add(mutator); - finalOpacity *= opacity; - } - /** * Get a list of all the raw mutators. The 0 index of the returned list is the top of the stack. */ @@ -247,9 +214,4 @@ public List getFinalClippingPaths() { public Matrix getFinalMatrix() { return finalMatrix; } - - /** Returns the final opacity value. Apply this value to the canvas of the view. */ - public float getFinalOpacity() { - return finalOpacity; - } } diff --git a/shell/platform/android/platform_view_android_jni_impl.cc b/shell/platform/android/platform_view_android_jni_impl.cc index a7af39a41dafe..79bea738b6a68 100644 --- a/shell/platform/android/platform_view_android_jni_impl.cc +++ b/shell/platform/android/platform_view_android_jni_impl.cc @@ -121,7 +121,6 @@ static jmethodID g_mutators_stack_init_method = nullptr; static jmethodID g_mutators_stack_push_transform_method = nullptr; static jmethodID g_mutators_stack_push_cliprect_method = nullptr; static jmethodID g_mutators_stack_push_cliprrect_method = nullptr; -static jmethodID g_mutators_stack_push_opacity_method = nullptr; // Called By Java static jlong AttachJNI(JNIEnv* env, jclass clazz, jobject flutterJNI) { @@ -1020,14 +1019,6 @@ bool PlatformViewAndroid::Register(JNIEnv* env) { return false; } - g_mutators_stack_push_opacity_method = - env->GetMethodID(g_mutators_stack_class->obj(), "pushOpacity", "(F)V"); - if (g_mutators_stack_push_opacity_method == nullptr) { - FML_LOG(ERROR) - << "Could not locate FlutterMutatorsStack.pushOpacity method"; - return false; - } - g_on_display_platform_view_method = env->GetMethodID(g_flutter_jni_class->obj(), "onDisplayPlatformView", "(IIIIIIILio/flutter/embedding/engine/mutatorsstack/" @@ -1462,15 +1453,10 @@ void PlatformViewAndroidJNIImpl::FlutterViewOnDisplayPlatformView( (int)rect.bottom(), radiisArray.obj()); break; } - case opacity: { - float opacity = (*iter)->GetAlphaFloat(); - env->CallVoidMethod(mutatorsStack, g_mutators_stack_push_opacity_method, - opacity); - break; - } // TODO(cyanglaz): Implement other mutators. // https://github.com/flutter/flutter/issues/58426 case clip_path: + case opacity: break; } ++iter; diff --git a/shell/platform/android/test/io/flutter/FlutterTestSuite.java b/shell/platform/android/test/io/flutter/FlutterTestSuite.java index eae516d515d90..7f42093a2f657 100644 --- a/shell/platform/android/test/io/flutter/FlutterTestSuite.java +++ b/shell/platform/android/test/io/flutter/FlutterTestSuite.java @@ -24,7 +24,6 @@ import io.flutter.embedding.engine.loader.ApplicationInfoLoaderTest; import io.flutter.embedding.engine.loader.FlutterLoaderTest; import io.flutter.embedding.engine.mutatorsstack.FlutterMutatorViewTest; -import io.flutter.embedding.engine.mutatorsstack.FlutterMutatorsStackTest; import io.flutter.embedding.engine.plugins.shim.ShimPluginRegistryTest; import io.flutter.embedding.engine.renderer.FlutterRendererTest; import io.flutter.embedding.engine.systemchannels.DeferredComponentChannelTest; @@ -74,7 +73,6 @@ FlutterJNITest.class, FlutterLaunchTests.class, FlutterLoaderTest.class, - FlutterMutatorsStackTest.class, FlutterMutatorViewTest.class, FlutterShellArgsTest.class, FlutterRendererTest.class, diff --git a/shell/platform/android/test/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorViewTest.java b/shell/platform/android/test/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorViewTest.java index 4c5bf1ea077c7..9a5e46b030971 100644 --- a/shell/platform/android/test/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorViewTest.java +++ b/shell/platform/android/test/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorViewTest.java @@ -1,13 +1,10 @@ package io.flutter.embedding.engine.mutatorsstack; -import static android.view.View.LAYER_TYPE_HARDWARE; import static android.view.View.OnFocusChangeListener; import static junit.framework.TestCase.*; import static org.mockito.Mockito.*; -import android.graphics.Canvas; import android.graphics.Matrix; -import android.graphics.Paint; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; @@ -253,20 +250,4 @@ public ViewTreeObserver getViewTreeObserver() { view.unsetOnDescendantFocusChangeListener(); verify(viewTreeObserver, times(1)).removeOnGlobalFocusChangeListener(activeFocusListener); } - - @Test - public void draw_opacityApplied() { - final FlutterMutatorView view = new FlutterMutatorView(RuntimeEnvironment.systemContext); - final FlutterMutatorView spy = spy(view); - - final FlutterMutatorsStack mutatorsStack = new FlutterMutatorsStack(); - mutatorsStack.pushOpacity(.3f); - - spy.readyToDisplay(mutatorsStack, /*left=*/ 1, /*top=*/ 2, /*width=*/ 0, /*height=*/ 0); - spy.draw(new Canvas()); - verify(spy) - .setLayerType( - intThat((Integer layerType) -> layerType == LAYER_TYPE_HARDWARE), - argThat((Paint paint) -> paint.getAlpha() == (int) (.3f * 255))); - } } diff --git a/shell/platform/android/test/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorsStackTest.java b/shell/platform/android/test/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorsStackTest.java deleted file mode 100644 index 9c8b5dbd20a59..0000000000000 --- a/shell/platform/android/test/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorsStackTest.java +++ /dev/null @@ -1,42 +0,0 @@ -package io.flutter.embedding.engine.mutatorsstack; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.robolectric.RobolectricTestRunner; -import org.robolectric.annotation.Config; - -@Config(manifest = Config.NONE) -@RunWith(RobolectricTestRunner.class) -public class FlutterMutatorsStackTest { - - @Test - public void pushOpacity() { - final FlutterMutatorsStack mutatorsStack = new FlutterMutatorsStack(); - mutatorsStack.pushOpacity(.5f); - - assertEquals(mutatorsStack.getMutators().size(), 1); - assertEquals( - mutatorsStack.getMutators().get(0).getType(), - FlutterMutatorsStack.FlutterMutatorType.OPACITY); - assertEquals(mutatorsStack.getMutators().get(0).getOpacity(), .5f, 0f); - } - - @Test - public void defaultOpacity() { - final FlutterMutatorsStack mutatorsStack = new FlutterMutatorsStack(); - - assertEquals(1f, mutatorsStack.getFinalOpacity(), 0f); - } - - @Test - public void layeredOpacity() { - final FlutterMutatorsStack mutatorsStack = new FlutterMutatorsStack(); - mutatorsStack.pushOpacity(.5f); - mutatorsStack.pushOpacity(.6f); - mutatorsStack.pushOpacity(1f); - - assertEquals(.3f, mutatorsStack.getFinalOpacity(), 1 / 255); - } -} diff --git a/shell/platform/fuchsia/dart_runner/BUILD.gn b/shell/platform/fuchsia/dart_runner/BUILD.gn index 63f41f6e56347..3d3fad3828380 100644 --- a/shell/platform/fuchsia/dart_runner/BUILD.gn +++ b/shell/platform/fuchsia/dart_runner/BUILD.gn @@ -223,11 +223,21 @@ template("jit_runner_package") { rebase_path("$target_gen_dir/kernel/vm_data${product_suffix}.bin") dest = "vm_snapshot_data.bin" }, + { + path = rebase_path( + "$target_gen_dir/kernel/vm_instructions${product_suffix}.bin") + dest = "vm_snapshot_instructions.bin" + }, { path = rebase_path( "$target_gen_dir/kernel/isolate_data${product_suffix}.bin") dest = "isolate_core_snapshot_data.bin" }, + { + path = rebase_path( + "$target_gen_dir/kernel/isolate_instructions${product_suffix}.bin") + dest = "isolate_core_snapshot_instructions.bin" + }, ] if (!invoker.product) { diff --git a/shell/platform/fuchsia/dart_runner/dart_component_controller.cc b/shell/platform/fuchsia/dart_runner/dart_component_controller.cc index 2f29dc4ea2603..b3d7a4ca1342c 100644 --- a/shell/platform/fuchsia/dart_runner/dart_component_controller.cc +++ b/shell/platform/fuchsia/dart_runner/dart_component_controller.cc @@ -206,10 +206,14 @@ bool DartComponentController::SetupFromKernel() { isolate_snapshot_data_)) { return false; } + if (!dart_utils::MappedResource::LoadFromNamespace( + nullptr, "/pkg/data/isolate_core_snapshot_instructions.bin", + isolate_snapshot_instructions_, true /* executable */)) { + return false; + } - // The core snapshot does not separate instructions from data. if (!CreateIsolate(isolate_snapshot_data_.address(), - nullptr /* isolate_snapshot_instructions */)) { + isolate_snapshot_instructions_.address())) { return false; } @@ -273,16 +277,16 @@ bool DartComponentController::SetupFromAppSnapshot() { return false; } } else { - // TODO(fxb/91200): This code path was broken for over a year and is - // probably not used. if (!dart_utils::MappedResource::LoadFromNamespace( namespace_, data_path_ + "/isolate_snapshot_data.bin", isolate_snapshot_data_)) { return false; } - isolate_data = isolate_snapshot_data_.address(); - // We don't separate instructions from data in 'core' snapshots. - isolate_instructions = nullptr; + if (!dart_utils::MappedResource::LoadFromNamespace( + namespace_, data_path_ + "/isolate_snapshot_instructions.bin", + isolate_snapshot_instructions_, true /* executable */)) { + return false; + } } return CreateIsolate(isolate_data, isolate_instructions); #endif // defined(AOT_RUNTIME) diff --git a/shell/platform/fuchsia/dart_runner/dart_component_controller_v2.cc b/shell/platform/fuchsia/dart_runner/dart_component_controller_v2.cc index e7d1065b5c490..31bec7d29e0c0 100644 --- a/shell/platform/fuchsia/dart_runner/dart_component_controller_v2.cc +++ b/shell/platform/fuchsia/dart_runner/dart_component_controller_v2.cc @@ -214,7 +214,6 @@ bool DartComponentControllerV2::CreateAndBindNamespace() { bool DartComponentControllerV2::SetUpFromKernel() { dart_utils::MappedResource manifest; - if (!dart_utils::MappedResource::LoadFromNamespace( namespace_, data_path_ + "/app.dilplist", manifest)) { return false; @@ -225,10 +224,14 @@ bool DartComponentControllerV2::SetUpFromKernel() { isolate_snapshot_data_)) { return false; } + if (!dart_utils::MappedResource::LoadFromNamespace( + nullptr, "/pkg/data/isolate_core_snapshot_instructions.bin", + isolate_snapshot_instructions_, true /* executable */)) { + return false; + } - // The core snapshot does not separate instructions from data. if (!CreateIsolate(isolate_snapshot_data_.address(), - nullptr /* isolate_snapshot_instructions */)) { + isolate_snapshot_instructions_.address())) { return false; } @@ -293,16 +296,16 @@ bool DartComponentControllerV2::SetUpFromAppSnapshot() { return false; } } else { - // TODO(fxb/91200): This code path was broken for over a year and is - // probably not used. if (!dart_utils::MappedResource::LoadFromNamespace( namespace_, data_path_ + "/isolate_snapshot_data.bin", isolate_snapshot_data_)) { return false; } - isolate_data = isolate_snapshot_data_.address(); - // We don't separate instructions from data in 'core' snapshots. - isolate_instructions = nullptr; + if (!dart_utils::MappedResource::LoadFromNamespace( + namespace_, data_path_ + "/isolate_snapshot_instructions.bin", + isolate_snapshot_instructions_, true /* executable */)) { + return false; + } } return CreateIsolate(isolate_data, isolate_instructions); #endif // defined(AOT_RUNTIME) diff --git a/shell/platform/fuchsia/dart_runner/dart_runner.cc b/shell/platform/fuchsia/dart_runner/dart_runner.cc index 17613db7299f5..fba5805216cb2 100644 --- a/shell/platform/fuchsia/dart_runner/dart_runner.cc +++ b/shell/platform/fuchsia/dart_runner/dart_runner.cc @@ -200,7 +200,13 @@ DartRunner::DartRunner(sys::ComponentContext* context) : context_(context) { nullptr, "/pkg/data/vm_snapshot_data.bin", vm_snapshot_data_)) { FX_LOG(FATAL, LOG_TAG, "Failed to load vm snapshot data"); } + if (!dart_utils::MappedResource::LoadFromNamespace( + nullptr, "/pkg/data/vm_snapshot_instructions.bin", + vm_snapshot_instructions_, true /* executable */)) { + FX_LOG(FATAL, LOG_TAG, "Failed to load vm snapshot instructions"); + } params.vm_snapshot_data = vm_snapshot_data_.address(); + params.vm_snapshot_instructions = vm_snapshot_instructions_.address(); #endif params.create_group = IsolateGroupCreateCallback; params.shutdown_isolate = IsolateShutdownCallback; diff --git a/shell/platform/fuchsia/dart_runner/kernel/BUILD.gn b/shell/platform/fuchsia/dart_runner/kernel/BUILD.gn index 92287802d22f3..d831ccd47be25 100644 --- a/shell/platform/fuchsia/dart_runner/kernel/BUILD.gn +++ b/shell/platform/fuchsia/dart_runner/kernel/BUILD.gn @@ -40,11 +40,17 @@ template("create_kernel_core_snapshot") { inputs = [ platform_dill ] vm_snapshot_data = "$target_gen_dir/vm_data${product_suffix}.bin" + vm_snapshot_instructions = + "$target_gen_dir/vm_instructions${product_suffix}.bin" isolate_snapshot_data = "$target_gen_dir/isolate_data${product_suffix}.bin" + isolate_snapshot_instructions = + "$target_gen_dir/isolate_instructions${product_suffix}.bin" snapshot_profile = "$target_gen_dir/snapshot_profile${product_suffix}.json" outputs = [ vm_snapshot_data, + vm_snapshot_instructions, isolate_snapshot_data, + isolate_snapshot_instructions, snapshot_profile, ] @@ -59,10 +65,14 @@ template("create_kernel_core_snapshot") { "--lazy_async_stacks", "--enable_mirrors=false", "--deterministic", - "--snapshot_kind=core", + "--snapshot_kind=core-jit", "--vm_snapshot_data=" + rebase_path(vm_snapshot_data, root_build_dir), + "--vm_snapshot_instructions=" + + rebase_path(vm_snapshot_instructions, root_build_dir), "--isolate_snapshot_data=" + rebase_path(isolate_snapshot_data, root_build_dir), + "--isolate_snapshot_instructions=" + + rebase_path(isolate_snapshot_instructions, root_build_dir), "--write_v8_snapshot_profile_to=" + rebase_path(snapshot_profile, root_build_dir), ] diff --git a/shell/platform/fuchsia/dart_runner/service_isolate.cc b/shell/platform/fuchsia/dart_runner/service_isolate.cc index a43f3382a25e6..6c7ca066c673b 100644 --- a/shell/platform/fuchsia/dart_runner/service_isolate.cc +++ b/shell/platform/fuchsia/dart_runner/service_isolate.cc @@ -96,6 +96,12 @@ Dart_Isolate CreateServiceIsolate( "/pkg/data/vmservice_isolate_snapshot_data.bin"; const char* snapshot_instructions_path = "/pkg/data/vmservice_isolate_snapshot_instructions.bin"; +#else + // The VM service is embedded in the core snapshot. + const char* snapshot_data_path = "/pkg/data/isolate_core_snapshot_data.bin"; + const char* snapshot_instructions_path = + "/pkg/data/isolate_core_snapshot_instructions.bin"; +#endif if (!dart_utils::MappedResource::LoadFromNamespace( nullptr, snapshot_data_path, mapped_isolate_snapshot_data)) { @@ -113,21 +119,8 @@ Dart_Isolate CreateServiceIsolate( vmservice_data = mapped_isolate_snapshot_data.address(); vmservice_instructions = mapped_isolate_snapshot_instructions.address(); +#if defined(AOT_RUNTIME) } -#else - // The VM service is embedded in the core snapshot. - // 'core' snapshot_kinds do not separate instructions from data, so we don't - // load an instructions file. - const char* snapshot_data_path = "/pkg/data/isolate_core_snapshot_data.bin"; - if (!dart_utils::MappedResource::LoadFromNamespace( - nullptr, snapshot_data_path, mapped_isolate_snapshot_data)) { - *error = strdup("Failed to load snapshot for service isolate"); - FX_LOG(ERROR, LOG_TAG, *error); - return nullptr; - } - - vmservice_data = mapped_isolate_snapshot_data.address(); - vmservice_instructions = nullptr; #endif bool is_null_safe = diff --git a/shell/platform/fuchsia/flutter/BUILD.gn b/shell/platform/fuchsia/flutter/BUILD.gn index 98669f0169ae1..de41ca3927e90 100644 --- a/shell/platform/fuchsia/flutter/BUILD.gn +++ b/shell/platform/fuchsia/flutter/BUILD.gn @@ -346,11 +346,21 @@ template("jit_runner") { "$snapshot_gen_dir/vm_isolate_snapshot${product_suffix}.bin") dest = "vm_snapshot_data.bin" }, + { + path = rebase_path( + "$snapshot_gen_dir/vm_snapshot_instructions${product_suffix}.bin") + dest = "vm_snapshot_instructions.bin" + }, { path = rebase_path( "$snapshot_gen_dir/isolate_snapshot${product_suffix}.bin") dest = "isolate_core_snapshot_data.bin" }, + { + path = rebase_path( + "$snapshot_gen_dir/isolate_snapshot_instructions${product_suffix}.bin") + dest = "isolate_core_snapshot_instructions.bin" + }, ] _vulkan_icds = [] diff --git a/shell/platform/fuchsia/flutter/component_v1.cc b/shell/platform/fuchsia/flutter/component_v1.cc index 0872a2d5292ff..36e7159cecd5f 100644 --- a/shell/platform/fuchsia/flutter/component_v1.cc +++ b/shell/platform/fuchsia/flutter/component_v1.cc @@ -348,13 +348,19 @@ ComponentV1::ComponentV1( return MakeFileMapping("/pkg/data/vm_snapshot_data.bin", false /* executable */); }; + settings_.vm_snapshot_instr = []() { + return MakeFileMapping("/pkg/data/vm_snapshot_instructions.bin", + true /* executable */); + }; + settings_.isolate_snapshot_data = []() { return MakeFileMapping("/pkg/data/isolate_core_snapshot_data.bin", false /* executable */); }; - - // 'core' snapshots do not separate instructions from data, so we - // don't set isolate_snapshot_instr here. + settings_.isolate_snapshot_instr = [] { + return MakeFileMapping("/pkg/data/isolate_core_snapshot_instructions.bin", + true /* executable */); + }; } #if defined(DART_PRODUCT) diff --git a/shell/platform/fuchsia/flutter/component_v2.cc b/shell/platform/fuchsia/flutter/component_v2.cc index 8d52908760849..b0683699a0dfc 100644 --- a/shell/platform/fuchsia/flutter/component_v2.cc +++ b/shell/platform/fuchsia/flutter/component_v2.cc @@ -412,13 +412,19 @@ ComponentV2::ComponentV2( return MakeFileMapping("/pkg/data/vm_snapshot_data.bin", false /* executable */); }; + settings_.vm_snapshot_instr = []() { + return MakeFileMapping("/pkg/data/vm_snapshot_instructions.bin", + true /* executable */); + }; + settings_.isolate_snapshot_data = []() { return MakeFileMapping("/pkg/data/isolate_core_snapshot_data.bin", false /* executable */); }; - - // 'core' snapshots do not separate instructions from data, so we - // don't set isolate_snapshot_instr here. + settings_.isolate_snapshot_instr = [] { + return MakeFileMapping("/pkg/data/isolate_core_snapshot_instructions.bin", + true /* executable */); + }; } #if defined(DART_PRODUCT) diff --git a/shell/platform/fuchsia/flutter/kernel/BUILD.gn b/shell/platform/fuchsia/flutter/kernel/BUILD.gn index 6086617acdf47..470f07964d74b 100644 --- a/shell/platform/fuchsia/flutter/kernel/BUILD.gn +++ b/shell/platform/fuchsia/flutter/kernel/BUILD.gn @@ -44,11 +44,17 @@ template("core_snapshot") { inputs = [ platform_dill ] vm_snapshot_data = "$target_gen_dir/vm_isolate_snapshot${suffix}.bin" + vm_snapshot_instructions = + "$target_gen_dir/vm_snapshot_instructions${suffix}.bin" isolate_snapshot_data = "$target_gen_dir/isolate_snapshot${suffix}.bin" + isolate_snapshot_instructions = + "$target_gen_dir/isolate_snapshot_instructions${suffix}.bin" snapshot_profile = "$target_gen_dir/snapshot_profile${suffix}.json" outputs = [ vm_snapshot_data, + vm_snapshot_instructions, isolate_snapshot_data, + isolate_snapshot_instructions, snapshot_profile, ] @@ -63,10 +69,14 @@ template("core_snapshot") { "--lazy_async_stacks", "--enable_mirrors=false", "--deterministic", - "--snapshot_kind=core", + "--snapshot_kind=core-jit", "--vm_snapshot_data=" + rebase_path(vm_snapshot_data, root_build_dir), + "--vm_snapshot_instructions=" + + rebase_path(vm_snapshot_instructions, root_build_dir), "--isolate_snapshot_data=" + rebase_path(isolate_snapshot_data, root_build_dir), + "--isolate_snapshot_instructions=" + + rebase_path(isolate_snapshot_instructions, root_build_dir), "--write_v8_snapshot_profile_to=" + rebase_path(snapshot_profile, root_build_dir), ]