mirror of
https://github.com/dart-lang/sdk
synced 2024-09-04 16:03:44 +00:00
![Alexander Markov](/assets/img/avatar_default.png)
This reverts commit beee442625
.
Reason for revert: StackOverflow on language_2/deep_nesting_expression_test/01 in interpreted mode.
Original change's description:
> [vm/bytecode] Switch kernel service dill to bytecode if building Dart SDK with --bytecode
>
> Temporary setting of FLAG_enable_interpreter is avoided in the VM unit tests as
> this flag is global and used by kernel service isolate while running tests.
> Flipping this flag causes assertion failures in kernel isolate's background compiler
> or infinite loop between LazyCompile stub and CompileFunction as AttachBytecode
> doesn't set entry point to InterpretCall.
>
> The less intrusive way to ensure compilation of functions in unit tests is to set
> FLAG_compilation_counter_threshold to 0.
>
> Change-Id: Ia46ff8d03d66ab8b147b9d89336548c4a9c29f5d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113123
> Commit-Queue: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Régis Crelier <regis@google.com>
TBR=rmacnak@google.com,alexmarkov@google.com,regis@google.com
Change-Id: I67cd03a56f9a2d29aa6597d38779e77ca3a16b18
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113480
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
114 lines
3.1 KiB
Plaintext
114 lines
3.1 KiB
Plaintext
# Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
|
|
# for details. All rights reserved. Use of this source code is governed by a
|
|
# BSD-style license that can be found in the LICENSE file.
|
|
|
|
import("../../build/dart/dart_action.gni")
|
|
import("../../build/dart/dart_host_sdk_toolchain.gni")
|
|
import("../../runtime/runtime_args.gni")
|
|
import("../application_snapshot.gni")
|
|
|
|
group("kernel-service") {
|
|
if (create_kernel_service_snapshot) {
|
|
deps = [
|
|
# TODO(rmacnak): Link this into 'dart'.
|
|
":copy_kernel-service_snapshot",
|
|
]
|
|
} else {
|
|
deps = [
|
|
":kernel_service_dill",
|
|
]
|
|
}
|
|
}
|
|
|
|
# TODO: Switch this to use kernel based app-jit snapshot
|
|
# when we are ready to switch to the kernel based core snapshots.
|
|
kernel_application_snapshot("kernel-service_snapshot") {
|
|
main_dart = "$root_gen_dir/kernel_service.dill"
|
|
deps = [
|
|
":kernel_service_dill",
|
|
]
|
|
training_args = [
|
|
"--train",
|
|
"file:///" + rebase_path("../../pkg/compiler/lib/src/dart2js.dart"),
|
|
]
|
|
if (dart_platform_bytecode) {
|
|
training_args += [ "--bytecode" ]
|
|
}
|
|
output = "$root_gen_dir/kernel-service.dart.snapshot"
|
|
}
|
|
|
|
copy("copy_kernel-service_snapshot") {
|
|
deps = [
|
|
":kernel-service_snapshot",
|
|
]
|
|
sources = [
|
|
"$root_gen_dir/kernel-service.dart.snapshot",
|
|
]
|
|
outputs = [
|
|
"$root_out_dir/kernel-service.dart.snapshot",
|
|
]
|
|
}
|
|
|
|
application_snapshot("frontend_server") {
|
|
main_dart = "../../pkg/vm/bin/frontend_server_starter.dart"
|
|
deps = [
|
|
"../../runtime/vm:kernel_platform_files($dart_host_toolchain)",
|
|
]
|
|
sdk_root = rebase_path("$root_out_dir")
|
|
training_args = [
|
|
"--train",
|
|
"--sdk-root=$sdk_root/",
|
|
"--platform=$sdk_root/vm_platform_strong.dill",
|
|
]
|
|
output = "$root_out_dir/frontend_server.dart.snapshot"
|
|
}
|
|
|
|
template("kernel_service_dill") {
|
|
prebuilt_dart_action("kernel_service" + target_name + "_dill") {
|
|
deps = [
|
|
"../../runtime/vm:kernel_platform_files($dart_host_toolchain)",
|
|
"../../runtime/vm:vm_platform",
|
|
]
|
|
kernel_service_script = "../../pkg/vm/bin/kernel_service.dart"
|
|
gen_kernel_script = "../../pkg/vm/bin/gen_kernel.dart"
|
|
|
|
inputs = [
|
|
gen_kernel_script,
|
|
kernel_service_script,
|
|
"$root_out_dir/vm_platform_strong.dill",
|
|
]
|
|
output = "$root_gen_dir/kernel_service" + invoker.target_name + ".dill"
|
|
outputs = [
|
|
output,
|
|
]
|
|
|
|
depfile = "$root_gen_dir/kernel_service" + invoker.target_name + "_dill.d"
|
|
abs_depfile = rebase_path(depfile)
|
|
rebased_output = rebase_path(output, root_build_dir)
|
|
vm_args = [
|
|
"--depfile=$abs_depfile",
|
|
"--depfile_output_filename=$rebased_output",
|
|
]
|
|
|
|
script = gen_kernel_script
|
|
|
|
args =
|
|
invoker.extra_args + [
|
|
"--packages=" + rebase_path("../../.packages"),
|
|
"--platform=" + rebase_path("$root_out_dir/vm_platform_strong.dill"),
|
|
"--no-aot",
|
|
"--no-embed-sources",
|
|
"--output=" + rebase_path(output),
|
|
rebase_path(kernel_service_script),
|
|
]
|
|
}
|
|
}
|
|
|
|
kernel_service_dill("") {
|
|
extra_args = []
|
|
}
|
|
|
|
kernel_service_dill("_bytecode") {
|
|
extra_args = [ "--gen-bytecode" ]
|
|
}
|