From 8375a6a35820e321afcac0c8500be1bf24458c2c Mon Sep 17 00:00:00 2001 From: Alexander Markov Date: Fri, 9 Oct 2020 13:07:33 -0700 Subject: [PATCH 1/2] Remove uses of Dart VM bytecode mode from Flutter engine --- flutter_frontend_server/lib/server.dart | 2 -- shell/platform/fuchsia/dart_runner/dart_runner.cc | 4 ---- shell/platform/fuchsia/dart_runner/kernel/BUILD.gn | 5 ----- shell/platform/fuchsia/flutter/component.cc | 7 ------- shell/platform/fuchsia/flutter/kernel/BUILD.gn | 5 ----- 5 files changed, 23 deletions(-) diff --git a/flutter_frontend_server/lib/server.dart b/flutter_frontend_server/lib/server.dart index 861ad11c572e5..1ced42a4d0de4 100644 --- a/flutter_frontend_server/lib/server.dart +++ b/flutter_frontend_server/lib/server.dart @@ -147,8 +147,6 @@ Future starter( '--target=flutter', '--track-widget-creation', '--enable-asserts', - '--gen-bytecode', - '--bytecode-options=source-positions,local-var-info,debugger-stops,instance-field-initializers,keep-unreachable-code,avoid-closure-call-instructions', ]); compiler ??= _FlutterFrontendCompiler( output, diff --git a/shell/platform/fuchsia/dart_runner/dart_runner.cc b/shell/platform/fuchsia/dart_runner/dart_runner.cc index 959803f5a8f19..e73f2baa4d4c8 100644 --- a/shell/platform/fuchsia/dart_runner/dart_runner.cc +++ b/shell/platform/fuchsia/dart_runner/dart_runner.cc @@ -47,10 +47,6 @@ const char* kDartVMArgs[] = { "--precompilation", #else "--enable_mirrors=false", - - // The interpreter is enabled unconditionally. If an app is built for - // debugging (that is, with no bytecode), the VM will fall back on ASTs. - "--enable_interpreter", #endif // No asserts in debug or release product. diff --git a/shell/platform/fuchsia/dart_runner/kernel/BUILD.gn b/shell/platform/fuchsia/dart_runner/kernel/BUILD.gn index 7bab46d61592f..97f4c508529be 100644 --- a/shell/platform/fuchsia/dart_runner/kernel/BUILD.gn +++ b/shell/platform/fuchsia/dart_runner/kernel/BUILD.gn @@ -22,10 +22,6 @@ compile_platform("kernel_platform_files") { args = [ "--enable-experiment=non-nullable", "--nnbd-agnostic", - - # TODO(dartbug.com/36342): enable bytecode for core libraries when performance of bytecode - # pipeline is on par with default pipeline and continuously tracked. - # "--bytecode", "--target=dart_runner", "dart:core", ] @@ -75,7 +71,6 @@ template("create_kernel_core_snapshot") { # TODO(FL-117): Re-enable causal async stack traces when this issue is # addressed. "--no_causal_async_stacks", - "--use_bytecode_compiler", "--enable_mirrors=false", "--deterministic", "--snapshot_kind=core-jit", diff --git a/shell/platform/fuchsia/flutter/component.cc b/shell/platform/fuchsia/flutter/component.cc index f317d7b988d5e..d1730e367366a 100644 --- a/shell/platform/fuchsia/flutter/component.cc +++ b/shell/platform/fuchsia/flutter/component.cc @@ -410,13 +410,6 @@ Application::Application( // by decreasing usage counters and flushing code which is still useful. settings_.dart_flags.push_back("--no-collect_code"); - if (!flutter::DartVM::IsRunningPrecompiledCode()) { - // The interpreter is enabled unconditionally in JIT mode. If an app is - // built for debugging (that is, with no bytecode), the VM will fall back on - // ASTs. - settings_.dart_flags.push_back("--enable_interpreter"); - } - // Don't collect CPU samples from Dart VM C++ code. settings_.dart_flags.push_back("--no_profile_vm"); diff --git a/shell/platform/fuchsia/flutter/kernel/BUILD.gn b/shell/platform/fuchsia/flutter/kernel/BUILD.gn index f221f4af1977c..724b40a590299 100644 --- a/shell/platform/fuchsia/flutter/kernel/BUILD.gn +++ b/shell/platform/fuchsia/flutter/kernel/BUILD.gn @@ -22,10 +22,6 @@ compile_platform("kernel_platform_files") { args = [ "--enable-experiment=non-nullable", "--nnbd-agnostic", - - # TODO(dartbug.com/36342): enable bytecode for core libraries when performance of bytecode - # pipeline is on par with default pipeline and continuously tracked. - # "--bytecode", "--target=flutter_runner", "dart:core", ] @@ -79,7 +75,6 @@ template("core_snapshot") { # TODO(FL-117): Re-enable causal async stack traces when this issue is # addressed. "--no_causal_async_stacks", - "--use_bytecode_compiler", "--enable_mirrors=false", "--deterministic", "--snapshot_kind=core-jit", From d959b29ab4b3cf5360745bc0ac1d28e240edf117 Mon Sep 17 00:00:00 2001 From: Alexander Markov Date: Fri, 9 Oct 2020 13:45:57 -0700 Subject: [PATCH 2/2] Remove obsolete option --no-collect_code --- shell/platform/fuchsia/flutter/component.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/shell/platform/fuchsia/flutter/component.cc b/shell/platform/fuchsia/flutter/component.cc index d1730e367366a..d60dff5c8d111 100644 --- a/shell/platform/fuchsia/flutter/component.cc +++ b/shell/platform/fuchsia/flutter/component.cc @@ -406,10 +406,6 @@ Application::Application( // addressed. settings_.dart_flags = {"--no_causal_async_stacks"}; - // Disable code collection as it interferes with JIT code warmup - // by decreasing usage counters and flushing code which is still useful. - settings_.dart_flags.push_back("--no-collect_code"); - // Don't collect CPU samples from Dart VM C++ code. settings_.dart_flags.push_back("--no_profile_vm");