diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn index 5c2a3a94d11..1d06186f50c 100644 --- a/runtime/BUILD.gn +++ b/runtime/BUILD.gn @@ -128,10 +128,6 @@ config("dart_config") { include_dirs += [ "../third_party/tcmalloc/gperftools/src" ] } - if (dart_platform_bytecode) { - defines += [ "DART_USE_BYTECODE" ] - } - if (is_fuchsia) { if (using_fuchsia_gn_sdk) { lib_dirs = [ root_out_dir + "/lib" ] diff --git a/runtime/runtime_args.gni b/runtime/runtime_args.gni index a20deb3f8c0..1c28c78c286 100644 --- a/runtime/runtime_args.gni +++ b/runtime/runtime_args.gni @@ -68,9 +68,6 @@ declare_args() { dart_component_kind = "static_library" } - # Controls whether the VM uses bytecode. - dart_platform_bytecode = false - # Whether the VM includes the kernel service in all modes (debug, release, # product). exclude_kernel_service = false diff --git a/runtime/vm/BUILD.gn b/runtime/vm/BUILD.gn index 8acf95e90cc..def74e403c3 100644 --- a/runtime/vm/BUILD.gn +++ b/runtime/vm/BUILD.gn @@ -191,9 +191,6 @@ template("gen_vm_platform") { if (defined(invoker.exclude_source) && invoker.exclude_source) { args += [ "--exclude-source" ] } - if (defined(invoker.bytecode) && invoker.bytecode) { - args += [ "--bytecode" ] - } outline = "vm_outline" + output_postfix + ".dill" } } @@ -218,10 +215,6 @@ gen_vm_platform("vm_platform_stripped") { add_implicit_vm_platform_dependency = false exclude_source = true output_postfix = "_strong_stripped" - - if (dart_platform_bytecode) { - bytecode = true - } } group("kernel_platform_files") { diff --git a/runtime/vm/flag_list.h b/runtime/vm/flag_list.h index a4bf348fa1c..279db5e11ee 100644 --- a/runtime/vm/flag_list.h +++ b/runtime/vm/flag_list.h @@ -20,12 +20,6 @@ constexpr bool kDartPrecompiledRuntime = true; constexpr bool kDartPrecompiledRuntime = false; #endif -#if defined(DART_USE_BYTECODE) -constexpr bool kDartUseBytecode = true; -#else -constexpr bool kDartUseBytecode = false; -#endif - #if defined(USING_THREAD_SANITIZER) // TODO(39611): Address races in the background compiler. constexpr bool kDartUseBackgroundCompilation = false; @@ -225,7 +219,7 @@ constexpr bool kDartUseBackgroundCompilation = true; D(trace_zones, bool, false, "Traces allocation sizes in the zone.") \ P(truncating_left_shift, bool, true, \ "Optimize left shift to truncate if possible") \ - P(use_bytecode_compiler, bool, kDartUseBytecode, "Compile from bytecode") \ + P(use_bytecode_compiler, bool, false, "Compile from bytecode") \ P(use_compactor, bool, false, "Compact the heap during old-space GC.") \ P(use_cha_deopt, bool, true, \ "Use class hierarchy analysis even if it can cause deoptimization.") \ diff --git a/tools/gn.py b/tools/gn.py index 11bf8a420b2..f4f5d7e7be8 100755 --- a/tools/gn.py +++ b/tools/gn.py @@ -169,8 +169,6 @@ def ToGnArgs(args, mode, arch, target_os, sanitizer, verify_sdk_hash): if gn_args['target_os'] in ['linux', 'win']: gn_args['dart_use_fallback_root_certificates'] = True - gn_args['dart_platform_bytecode'] = args.bytecode - # Use tcmalloc only when targeting Linux and when not using ASAN. gn_args['dart_use_tcmalloc'] = ((gn_args['target_os'] == 'linux') and sanitizer == 'none') @@ -385,17 +383,6 @@ def AddCommonGnOptionArgs(parser): action='store_false') parser.set_defaults(verify_sdk_hash=True) - parser.add_argument('--bytecode', - '-b', - help='Use bytecode in Dart VM', - dest='bytecode', - action="store_true") - parser.add_argument('--no-bytecode', - help='Disable bytecode in Dart VM', - dest='bytecode', - action="store_false") - parser.set_defaults(bytecode=False) - parser.add_argument('--clang', help='Use Clang', action='store_true') parser.add_argument('--no-clang', help='Disable Clang', diff --git a/utils/application_snapshot.gni b/utils/application_snapshot.gni index 372e74e538a..890c1087f44 100644 --- a/utils/application_snapshot.gni +++ b/utils/application_snapshot.gni @@ -127,13 +127,6 @@ template("_application_snapshot") { # "kernel_snapshot" passes this if needed, we always pass it) "-Dsdk_hash=$sdk_hash", ] - if (dart_platform_bytecode) { - args += [ - "--gen-bytecode", - "--drop-ast", - "--bytecode-options=source-positions", - ] - } args += [ rebase_path(main_dart) ] } diff --git a/utils/kernel-service/BUILD.gn b/utils/kernel-service/BUILD.gn index 683c2d08355..4d464c4f3cb 100644 --- a/utils/kernel-service/BUILD.gn +++ b/utils/kernel-service/BUILD.gn @@ -26,9 +26,6 @@ kernel_application_snapshot("kernel-service_snapshot") { # Without the ', "/"' part, on Linux it would get four slashes. "file:///" + rebase_path("../../pkg/compiler/lib/src/dart2js.dart", "/"), ] - if (dart_platform_bytecode) { - training_args += [ "--bytecode" ] - } output = "$root_gen_dir/kernel-service.dart.snapshot" } @@ -113,12 +110,6 @@ template("kernel_service_dill") { "--output=" + rebase_path(output), ] args += [ scheme + ":///pkg/vm/bin/kernel_service.dart" ] - if (dart_platform_bytecode) { - args += [ - "--gen-bytecode", - "--drop-ast", - ] - } } }