Skip to content

Commit

Permalink
Remove bytecode mode of Dart SDK build
Browse files Browse the repository at this point in the history
This change cleans up build.py --bytecode and gn.py --bytecode options.

Change-Id: Ie251e7049ce3f8f9da28d35eda139b60ee23af98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167842
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
  • Loading branch information
alexmarkov authored and commit-bot@chromium.org committed Oct 21, 2020
1 parent 17af4fe commit d014a0f
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 50 deletions.
4 changes: 0 additions & 4 deletions runtime/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
Expand Down
3 changes: 0 additions & 3 deletions runtime/runtime_args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions runtime/vm/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
Expand All @@ -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") {
Expand Down
8 changes: 1 addition & 7 deletions runtime/vm/flag_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.") \
Expand Down
13 changes: 0 additions & 13 deletions tools/gn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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',
Expand Down
7 changes: 0 additions & 7 deletions utils/application_snapshot.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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) ]
}

Expand Down
9 changes: 0 additions & 9 deletions utils/kernel-service/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down Expand Up @@ -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",
]
}
}
}

Expand Down

0 comments on commit d014a0f

Please sign in to comment.