[build] Add -a kbc for interpreter

This CL adds support to build.py and test.py for building/testing
a VM with the interpreter on x64, e.g.:

$ ./tools/gn.py -m release -a x64 --bytecode
$ ./tools/build.py -m release -a x64 --bytecode runtime
$ ./tools/test.py -m release -a x64 -r vm -c dartkb language_2

Change-Id: I956d23790636609d4a2e71129481fcbd7afef9a0
Reviewed-on: https://dart-review.googlesource.com/65206
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
Zach Anderson 2018-07-17 21:51:41 +00:00 committed by commit-bot@chromium.org
parent 8aeb7de19d
commit d0510501d2
27 changed files with 181 additions and 124 deletions

View file

@ -85,7 +85,7 @@ Future<Component> compileToKernel(Uri source, CompilerOptions options,
// Restore error handler (in case 'options' are reused).
options.onProblem = errorDetector.previousErrorHandler;
if (genBytecode && component != null) {
if (!errorDetector.hasCompilationErrors && genBytecode && component != null) {
generateBytecode(component,
strongMode: options.strongMode, dropAST: dropAST);
}

View file

@ -53,13 +53,13 @@ dart/simd128float32_test: Skip # compilers not aware of Simd128
dart/truncating_ints_test: SkipByDesign # The test requires int64.
dart/wrap_around_in_range_analysis_test: SkipByDesign # The test requires int64.
[ $compiler == dartk ]
[ ($compiler == dartk || $compiler == dartkb) ]
cc/DartAPI_New: Fail # Issue #33041
dart/appjit_cha_deopt_test: SkipSlow # Issue 33266
dart/redirection_type_shuffling_test/00: RuntimeError, Pass
dart/redirection_type_shuffling_test/none: RuntimeError
[ $compiler != dartk ]
[ $compiler != dartk && $compiler != dartkb ]
cc/IsolateReload_KernelIncrementalCompile: SkipByDesign
cc/IsolateReload_KernelIncrementalCompileAppAndLib: SkipByDesign
cc/IsolateReload_KernelIncrementalCompileExpression: SkipByDesign
@ -128,7 +128,7 @@ cc/Profiler_ToggleRecordAllocation: Skip
cc/Profiler_TrivialRecordAllocation: Skip
cc/Profiler_TypedArrayAllocation: Skip
[ $arch != simarm && $arch != simarm64 && $arch != simdbc64 && $compiler == dartk && $hot_reload ]
[ $arch != simarm && $arch != simarm64 && $arch != simdbc64 && ($compiler == dartk || $compiler == dartkb) && $hot_reload ]
dart/data_uri_import_test/base64: Crash
dart/data_uri_import_test/nocharset: Crash
dart/data_uri_import_test/nomime: Crash
@ -136,7 +136,7 @@ dart/data_uri_import_test/percentencoded: Crash
dart/data_uri_import_test/utf16: Crash
dart/data_uri_import_test/wrongmime: Crash
[ $arch == x64 && $compiler == dartk && $system == windows && $strong ]
[ $arch == x64 && ($compiler == dartk || $compiler == dartkb) && $system == windows && $strong ]
cc/Profiler_BasicSourcePosition: Fail # http://dartbug.com/33224
cc/Profiler_CodeTicks: Fail # dartbug.com/33337
@ -154,21 +154,21 @@ cc/Dart2JSCompileAll: SkipSlow # Timeout.
[ $compiler == dart2analyzer && $strong ]
dart/redirection_type_shuffling_test/00: CompileTimeError
[ $compiler == dartk && $mode == debug && $runtime == vm ]
[ ($compiler == dartk || $compiler == dartkb) && $mode == debug && $runtime == vm ]
cc/PrintJSON: Crash
cc/Service_TokenStream: Crash
# Enabling of dartk for sim{arm,arm64,dbc64} revelaed these test failures, which
# are to be triaged. Isolate tests are skipped on purpose due to the usage of
# batch mode.
[ $compiler == dartk && $mode == debug && ($arch == simarm || $arch == simarm64) ]
[ ($compiler == dartk || $compiler == dartkb) && $mode == debug && ($arch == simarm || $arch == simarm64) ]
cc/StackTraceMallocHookLengthTest: Fail # Please triage.
[ $compiler == dartk && $mode == release && $runtime == vm ]
[ ($compiler == dartk || $compiler == dartkb) && $mode == release && $runtime == vm ]
cc/CorelibIsolateStartup: Timeout, Pass
cc/Service_TokenStream: Fail
[ $compiler == dartk && $runtime == vm ]
[ ($compiler == dartk || $compiler == dartkb) && $runtime == vm ]
cc/Class_ComputeEndTokenPos: Crash
cc/DartAPI_LoadLibrary: Fail, Crash # Issue 33048.
cc/DebuggerAPI_BreakpointStubPatching: Fail
@ -205,13 +205,13 @@ cc/UseDartApi: Fail
dart/data_uri_import_test/utf16: MissingRuntimeError
dart/spawn_shutdown_test: SkipSlow
[ $compiler == dartk && $runtime == vm && $system == macos ]
[ ($compiler == dartk || $compiler == dartkb) && $runtime == vm && $system == macos ]
cc/IsolateReload_LibraryLookup: Fail, Crash
[ $compiler == dartk && $system == linux ]
[ ($compiler == dartk || $compiler == dartkb) && $system == linux ]
cc/IsolateReload_LibraryLookup: Fail, Crash
[ $compiler == dartk && $system == windows ]
[ ($compiler == dartk || $compiler == dartkb) && $system == windows ]
cc/IsolateReload_LibraryLookup: Fail, Crash
cc/Profiler_FunctionTicks: Fail, Pass
cc/Profiler_ToggleRecordAllocation: Fail, Pass
@ -219,10 +219,10 @@ cc/Profiler_TrivialRecordAllocation: Fail, Pass
cc/Service_Address: Fail
cc/Service_Code: Fail
[ $compiler == dartk && $checked ]
[ ($compiler == dartk || $compiler == dartkb) && $checked ]
dart/redirection_type_shuffling_test/00: Pass # Works in --checked mode but not in --strong mode.
[ $compiler == dartk && $strong ]
[ ($compiler == dartk || $compiler == dartkb) && $strong ]
cc/DartGeneratedArrayLiteralMessages: Crash # Issue 32190
cc/FullSnapshot1: Crash # Issue 32190
cc/IsolateReload_LibraryLookup: Fail, Crash # Issue 32190
@ -230,7 +230,7 @@ cc/MismatchedSnapshotKinds: Fail, Crash, OK # Script snapshots not supported in
cc/ScriptSnapshot1: Fail, Crash, OK # Script snapshots not supported in Dart 2
cc/ScriptSnapshotsUpdateSubclasses: Fail, Crash, OK # Script snapshots not supported in Dart 2
[ $compiler == dartk && ($arch == simarm || $arch == simarm64 || $arch == simdbc || $arch == simdbc64) ]
[ ($compiler == dartk || $compiler == dartkb) && ($arch == simarm || $arch == simarm64 || $arch == simdbc || $arch == simdbc64) ]
dart/appjit_cha_deopt_test: SkipSlow # DFE too slow
dart/appjit_determinism_test: SkipSlow # DFE too slow
dart/script_determinism_test: SkipSlow # DFE too slow
@ -238,14 +238,14 @@ dart/script_determinism_test: SkipSlow # DFE too slow
# Enabling of dartk for sim{arm,arm64,dbc64} revelaed these test failures, which
# are to be triaged. Isolate tests are skipped on purpose due to the usage of
# batch mode.
[ $compiler == dartk && ($arch == simarm || $arch == simarm64 || $arch == simdbc64) ]
[ ($compiler == dartk || $compiler == dartkb) && ($arch == simarm || $arch == simarm64 || $arch == simdbc64) ]
dart/data_uri_spawn_test: Skip # Please triage.
dart/snapshot_version_test: RuntimeError # Please triage.
[ $compiler == dartk && ($hot_reload || $hot_reload_rollback) ]
[ ($compiler == dartk || $compiler == dartkb) && ($hot_reload || $hot_reload_rollback) ]
dart/data_uri_spawn_test: Skip # Timeout
[ $compiler != dartk && $compiler != none ]
[ $compiler != dartk && $compiler != dartkb && $compiler != none ]
dart/appjit_cha_deopt_test: SkipByDesign # Test needs to run from source
dart/appjit_determinism_test: SkipByDesign # Test needs to run from source
dart/script_determinism_test: SkipByDesign # Test needs to run from source
@ -317,7 +317,7 @@ cc/RegenerateAllocStubs: Skip # This test is meaningless for DBC as allocation s
dart/data_uri*test: Skip # Data uri's not supported by dart2js or the analyzer.
# Tests that use functionality not supported in Dart 2.
[ $compiler == dartk || $compiler == dartkp ]
[ ($compiler == dartk || $compiler == dartkb) || $compiler == dartkp ]
cc/CanonicalizationInScriptSnapshots: SkipByDesign # Script snapshots unsupported.
cc/DartAPI_IsolateSetCheckedMode: SkipByDesign # Checked mode is not relevant for dart 2?
cc/DartAPI_LazyLoadDeoptimizes: SkipByDesign # Issue 33043, Dart_LoadSource unsupported.

View file

@ -23,7 +23,7 @@ sample_extension/test/sample_extension_app_snapshot_test: Pass, RuntimeError # I
[ $compiler == none && $runtime == vm && $system == fuchsia ]
*: Skip # Not yet triaged.
[ $compiler == app_jitk || $compiler == dartk || $compiler == dartkp ]
[ $compiler == app_jitk || $compiler == dartk || $compiler == dartkb || $compiler == dartkp ]
sample_extension/test/sample_extension_app_snapshot_test: RuntimeError
sample_extension/test/sample_extension_script_snapshot_test: RuntimeError
sample_extension/test/sample_extension_test: RuntimeError

View file

@ -1783,5 +1783,5 @@ LibTest/typed_data/Uint64List/Uint64List.fromList_A01_t02: CompileTimeError
LibTest/typed_data/Uint64List/Uint64List.view_A01_t01: CompileTimeError
LibTest/typed_data/Uint64List/Uint64List.view_A01_t02: CompileTimeError
[ $compiler == app_jitk || $compiler == dartk || $compiler == dartkp ]
[ $compiler == app_jitk || $compiler == dartk || $compiler == dartkb || $compiler == dartkp ]
*: SkipByDesign

View file

@ -232,7 +232,7 @@ LibTest/collection/Maps/forEach_A01_t05: CompileTimeError
LibTest/collection/Maps/forEach_A01_t06: CompileTimeError
LibTest/collection/Maps/forEach_A02_t01: CompileTimeError
[ $compiler == dartk && $strong ]
[ $compiler == dartk || $compiler == dartkb && $strong ]
Language/Classes/Constructors/Constant_Constructors/potentially_constant_expression_t01: Crash
Language/Expressions/Additive_Expressions/syntax_t01: RuntimeError
Language/Expressions/Assignment/null_aware_assignment_static_type_t01: RuntimeError

View file

@ -281,11 +281,11 @@ string_base_vm_static_test: MissingCompileTimeError
string_replace_static_test: MissingCompileTimeError
string_static_test: MissingCompileTimeError
[ $compiler == dartk && $mode == release && $hot_reload ]
[ ($compiler == dartk || $compiler == dartkb) && $mode == release && $hot_reload ]
bigint_parse_radix_test: Crash
# ===== dartk + vm status lines =====
[ $compiler == dartk && $runtime == vm && $strong ]
[ ($compiler == dartk || $compiler == dartkb) && $runtime == vm && $strong ]
iterable_fold_test/02: RuntimeError
iterable_reduce_test/01: CompileTimeError # Issue 31533
iterable_reduce_test/none: RuntimeError
@ -446,7 +446,7 @@ symbol_test/01: MissingCompileTimeError
# a section you need, please reach out to sigmund@ to see the best way to add
# them.
# ===== Skip dartk and darkp in !$strong mode ====
[ !$strong && ($compiler == dartk || $compiler == dartkp) ]
[ !$strong && ($compiler == dartk || $compiler == dartkb || $compiler == dartkp) ]
*: SkipByDesign
[ !$strong && ($runtime == dart_precompiled || $runtime == vm) ]

View file

@ -57,7 +57,7 @@ ping_test: Skip # Resolve test issues
[ $compiler == app_jit || $mode == product || $runtime != vm ]
checked_test: Skip # Unsupported.
[ $compiler == dartk || $compiler == dartkp ]
[ $compiler == dartk || $compiler == dartkb || $compiler == dartkp ]
*: Skip # This directory has only Dart1 tests (Dart2 tests are in lib_2/isolate).
[ $compiler != none || $runtime != vm ]

View file

@ -11,7 +11,7 @@ unsorted/super_initializer_test: Skip
[ !$fasta ]
unsorted/loop_test: Skip # This test uses optional new/const.
[ $compiler != app_jitk && $compiler != dart2js && $compiler != dartk && $compiler != dartkp && $runtime != none ]
[ $compiler != app_jitk && $compiler != dart2js && $compiler != dartk && $compiler != dartkb && $compiler != dartkp && $runtime != none ]
unsorted/types_test: RuntimeError
[ $compiler == dart2analyzer && $runtime == none ]
@ -34,7 +34,7 @@ unsorted/super_mixin_test: CompileTimeError
[ $compiler == dart2js && !$strong ]
unsorted/types_test: RuntimeError
[ $compiler != dartk && $compiler != dartkp && !$strong ]
[ $compiler != dartk && $compiler != dartkb && $compiler != dartkp && !$strong ]
unsorted/invocation_errors_test/00: MissingCompileTimeError # This test has been tuned for dart 2.
[ $runtime == dart_precompiled && $minified ]

View file

@ -324,7 +324,7 @@ assertion_initializer_const_function_error_test/01: MissingCompileTimeError
[ $compiler != dart2js && $runtime != vm && $fasta ]
deferred_constraints_constants_test/default_argument2: MissingCompileTimeError
[ $compiler != dartk && $compiler != dartkp && ($runtime == dart_precompiled || $runtime == flutter || $runtime == vm) ]
[ $compiler != dartk && $compiler != dartkb && $compiler != dartkp && ($runtime == dart_precompiled || $runtime == flutter || $runtime == vm) ]
abstract_beats_arguments2_test/01: Crash # Issue 29171
[ $compiler == none && $runtime == vm && $system == fuchsia ]
@ -414,7 +414,7 @@ generic_methods_new_test: Pass # Issue 25869, These generic functions tests pass
generic_methods_test: Pass # Issue 25869, These generic functions tests pass for the wrong reason in checked mode, because the parsed type parameters are mapped to dynamic type.
type_variable_bounds4_test/01: Fail # Issue 14006
[ ($compiler == app_jit || $compiler == dartk || $compiler == dartkp || $compiler == none || $compiler == precompiler) && ($runtime == dart_precompiled || $runtime == flutter || $runtime == vm) ]
[ ($compiler == app_jit || $compiler == dartk || $compiler == dartkb || $compiler == dartkp || $compiler == none || $compiler == precompiler) && ($runtime == dart_precompiled || $runtime == flutter || $runtime == vm) ]
dynamic_prefix_core_test/none: Fail # Issue 12478
[ ($compiler == app_jit || $compiler == none || $compiler == precompiler) && ($runtime == dart_precompiled || $runtime == flutter || $runtime == vm) ]
@ -426,7 +426,7 @@ unicode_bom_test: Fail # Issue 16067
vm/debug_break_enabled_vm_test/01: Crash, OK # Expected to hit breakpoint.
# These test entries will be valid for vm (with and without kernel).
[ $compiler == app_jit || $compiler == dartk || $compiler == none || $runtime == dart_precompiled ]
[ $compiler == app_jit || $compiler == dartk || $compiler == dartkb || $compiler == none || $runtime == dart_precompiled ]
async_star_cancel_while_paused_test: RuntimeError
async_star_pause_test: Fail, OK # This is OK for now, but we may want to change the semantics to match the test.
constructor2_test: Fail, OK # Failures related to super call in ctor initializer list
@ -534,5 +534,5 @@ static_closure_identical_test: Pass, Fail # Closure identity
vm/optimized_stacktrace_test: Pass, Slow
vm/regress_27201_test: Pass, Crash # Requires deferred libraries
[ $compiler != dartk && $compiler != dartkp && $compiler != none || $compiler != dartk && $compiler != dartkp && $runtime != vm ]
[ $compiler != dartk && $compiler != dartkb && $compiler != dartkp && $compiler != none || $compiler != dartk && $compiler != dartkb && $compiler != dartkp && $runtime != vm ]
assert_initializer_test/*: Skip # not implemented yet, experiment is VM only.

View file

@ -193,5 +193,5 @@ unresolved_top_level_var_negative_test: Fail
# We skip all the Dart 1.0 tests in dartk and dartkp mode as these
# modes are intended only for Dart 2.0 with strong mode enabled.
[ $compiler == app_jitk || $compiler == dartk || $compiler == dartkp ]
[ $compiler == app_jitk || $compiler == dartk || $compiler == dartkb || $compiler == dartkp ]
*: SkipByDesign

View file

@ -548,7 +548,7 @@ void_type_usage_test/paren_toString: MissingCompileTimeError # Issue 32804
void_type_usage_test/paren_void_init: MissingCompileTimeError # Issue 32804
void_type_usage_test/paren_while: MissingCompileTimeError # Issue 32804
[ $arch != simarm && $arch != simarm64 && $arch != simdbc64 && $compiler == dartk && $runtime == vm && $strong ]
[ $arch != simarm && $arch != simarm64 && $arch != simdbc64 && ($compiler == dartk || $compiler == dartkb) && $runtime == vm && $strong ]
export_ambiguous_main_test: Crash # Issue 32618
[ $compiler == app_jitk && $mode == product ]
@ -559,7 +559,7 @@ vm/causal_async_exception_stack_test: RuntimeError
[ $compiler == app_jitk && ($mode == debug || $mode == release) ]
assertion_test: RuntimeError
[ $compiler != app_jitk && $compiler != dart2js && $compiler != dartk && $compiler != dartkp && $fasta ]
[ $compiler != app_jitk && $compiler != dart2js && $compiler != dartk && $compiler != dartkb && $compiler != dartkp && $fasta ]
const_optional_args_test/01: MissingCompileTimeError
# The precomilation configuration uses a kernel2kernel constants evaluator
@ -579,17 +579,17 @@ mixin_supertype_subclass_test/05: MissingCompileTimeError
[ $compiler != dart2js && $fasta && $strong ]
super_call4_test/01: MissingCompileTimeError
[ $compiler == dartk && $mode == debug && $hot_reload ]
[ ($compiler == dartk || $compiler == dartkb) && $mode == debug && $hot_reload ]
async_star_test/01: Crash
async_star_test/05: Crash
[ $compiler == dartk && $mode == debug && $hot_reload_rollback ]
[ ($compiler == dartk || $compiler == dartkb) && $mode == debug && $hot_reload_rollback ]
enum_test: Crash
[ $compiler == dartk && $mode == debug && ($hot_reload || $hot_reload_rollback) ]
[ ($compiler == dartk || $compiler == dartkb) && $mode == debug && ($hot_reload || $hot_reload_rollback) ]
enum_duplicate_test/01: Crash
[ $compiler == dartk && $mode == product && $runtime == vm ]
[ ($compiler == dartk || $compiler == dartkb) && $mode == product && $runtime == vm ]
deferred_load_constants_test/02: Fail
deferred_load_constants_test/03: Fail
deferred_load_constants_test/05: Fail
@ -606,7 +606,7 @@ vm/type_vm_test/34: MissingRuntimeError
vm/type_vm_test/35: MissingRuntimeError
vm/type_vm_test/36: MissingRuntimeError
[ $compiler == dartk && $runtime == vm && $checked && $strong ]
[ ($compiler == dartk || $compiler == dartkb) && $runtime == vm && $checked && $strong ]
assert_initializer_test/31: MissingCompileTimeError # KernelVM bug: Constant evaluation.
assert_initializer_test/32: MissingCompileTimeError # KernelVM bug: Constant evaluation.
assert_initializer_test/33: MissingCompileTimeError # KernelVM bug: Constant evaluation.
@ -641,7 +641,7 @@ redirecting_factory_malbounded_test/01: Fail
regress_30339_test: RuntimeError
type_variable_bounds4_test/01: RuntimeError
[ $compiler == dartk && $runtime == vm && !$checked && $strong ]
[ ($compiler == dartk || $compiler == dartkb) && $runtime == vm && !$checked && $strong ]
assertion_initializer_const_error2_test/cc01: MissingCompileTimeError # Not reporting failed assert() at compile time.
assertion_initializer_const_error2_test/cc02: MissingCompileTimeError # Not reporting failed assert() at compile time.
assertion_initializer_const_error2_test/cc03: MissingCompileTimeError # Not reporting failed assert() at compile time.
@ -657,7 +657,7 @@ conditional_rewrite_test: RuntimeError # Issue 31402 (Not)
type_error_test: RuntimeError # Issue 31402 (Variable declaration)
# ===== dartk + vm status lines =====
[ $compiler == dartk && $runtime == vm && $strong ]
[ ($compiler == dartk || $compiler == dartkb) && $runtime == vm && $strong ]
arithmetic2_test: RuntimeError # Throws CastError instead of TypeError
async_star_cancel_while_paused_test: RuntimeError
async_star_pause_test: Fail, OK
@ -800,10 +800,10 @@ web_int_literals_test/*: SkipByDesign # Test applies only to JavaScript targets
wrong_number_type_arguments_test/01: MissingCompileTimeError
wrong_number_type_arguments_test/none: Pass
[ $compiler == dartk && $system == windows && $strong ]
[ ($compiler == dartk || $compiler == dartkb) && $system == windows && $strong ]
ct_const2_test: Fail
[ $compiler == dartk && $checked ]
[ ($compiler == dartk || $compiler == dartkb) && $checked ]
assertion_initializer_const_error2_test/cc01: Pass # Works in --checked mode but not in --strong mode.
assertion_initializer_const_error2_test/cc02: Pass # Works in --checked mode but not in --strong mode.
assertion_initializer_const_error2_test/cc03: Pass # Works in --checked mode but not in --strong mode.
@ -815,20 +815,20 @@ assertion_initializer_const_error2_test/cc08: Pass # Works in --checked mode but
assertion_initializer_const_error2_test/cc09: Pass # Works in --checked mode but not in --strong mode.
assertion_initializer_const_error2_test/cc10: Pass # Works in --checked mode but not in --strong mode.
[ $compiler == dartk && $hot_reload_rollback ]
[ ($compiler == dartk || $compiler == dartkb) && $hot_reload_rollback ]
symbol_conflict_test: Pass, Slow
[ $compiler == dartk && $strong ]
[ ($compiler == dartk || $compiler == dartkb) && $strong ]
covariant_subtyping_test: RuntimeError
redirecting_factory_reflection_test: RuntimeError
# Enabling of dartk for sim{arm,arm64,dbc64} revealed these test failures, which
# are to be triaged. Isolate tests are skipped on purpose due to the usage of
# batch mode.
[ $compiler == dartk && $strong && ($arch == simarm || $arch == simarm64 || $arch == simdbc64) ]
[ ($compiler == dartk || $compiler == dartkb) && $strong && ($arch == simarm || $arch == simarm64 || $arch == simdbc64) ]
least_upper_bound_expansive_test/none: RuntimeError # Please triage.
[ $compiler == dartk && ($hot_reload || $hot_reload_rollback) ]
[ ($compiler == dartk || $compiler == dartkb) && ($hot_reload || $hot_reload_rollback) ]
async_star_test/01: Skip # Timeout
async_star_test/02: Skip # Timeout
async_star_test/03: Skip # Timeout
@ -1387,7 +1387,7 @@ super_no_such_method4_test/01: MissingCompileTimeError # Requires Dart 2 semanti
super_no_such_method5_test/01: MissingCompileTimeError # Requires Dart 2 semantics. See http://dartbug.com/33380.
variable_shadow_class_test/01: MissingCompileTimeError
[ $mode == debug && $runtime == vm && $strong && ($compiler == app_jitk || $compiler == dartk) ]
[ $mode == debug && $runtime == vm && $strong && ($compiler == app_jitk || $compiler == dartk || $compiler == dartkb) ]
const_instance_field_test/01: Crash # Issue 32326.
deopt_inlined_function_lazy_test: Skip
@ -2185,15 +2185,15 @@ unresolved_in_factory_test: MissingCompileTimeError
unresolved_top_level_method_test: MissingCompileTimeError
unresolved_top_level_var_test: MissingCompileTimeError
[ !$strong && ($compiler == dartk || $compiler == dartkp || $runtime == dart_precompiled || $runtime == vm) ]
[ !$strong && ($compiler == dartk || $compiler == dartkb || $compiler == dartkp || $runtime == dart_precompiled || $runtime == vm) ]
*: SkipByDesign # language_2 is only supported in strong mode.
[ ($compiler == app_jitk || $compiler == dartk || $compiler == dartkp) && ($runtime == dart_precompiled || $runtime == vm) ]
[ ($compiler == app_jitk || $compiler == dartk || $compiler == dartkb || $compiler == dartkp) && ($runtime == dart_precompiled || $runtime == vm) ]
type_alias_equality_test/02: RuntimeError # Issue 31359
type_alias_equality_test/03: RuntimeError # Issue 31359
type_alias_equality_test/04: RuntimeError # Issue 31359
[ $compiler == dartk || $compiler == dartkp ]
[ $compiler == dartk || $compiler == dartkb || $compiler == dartkp ]
generic_function_bounds_test: RuntimeError # Issue 32076
generic_test/01: MissingCompileTimeError

View file

@ -306,7 +306,7 @@ convert/utf82_test: CompileTimeError # Note: dart2js passes for the wrong reason
js/datetime_roundtrip_test: CompileTimeError
js/null_test: CompileTimeError
[ $compiler != dartk && $compiler != dartkp && ($runtime == dart_precompiled || $runtime == flutter || $runtime == vm) ]
[ $compiler != dartk && $compiler != dartkb && $compiler != dartkp && ($runtime == dart_precompiled || $runtime == flutter || $runtime == vm) ]
mirrors/initializing_formals_test/01: Fail # initializing formals are implicitly final as of Dart 1.21
[ $compiler == none && $mode == product ]
@ -376,7 +376,7 @@ mirrors/symbol_validation_test: RuntimeError # Issue 13596
# All these tests have been migrated as strong mode compatible tests to
# lib_2, so skipping these tests for dartk and dartkp
[ $compiler == app_jitk || $compiler == dartk || $compiler == dartkp ]
[ $compiler == app_jitk || $compiler == dartk || $compiler == dartkb || $compiler == dartkp ]
*: SkipByDesign
[ $runtime == chrome || $runtime == ff ]

View file

@ -44,16 +44,16 @@ mirrors/reflected_type_test/02: MissingCompileTimeError
mirrors/reflected_type_test/03: MissingCompileTimeError
mirrors/variable_is_const_test/01: MissingCompileTimeError
[ $arch == simarm64 && $compiler == dartk && $strong ]
[ $arch == simarm64 && ($compiler == dartk || $compiler == dartkb) && $strong ]
isolate/mint_maker_test: Timeout # Please triage.
[ $arch == simdbc64 && $compiler == dartk && $mode == debug && $runtime == vm && $strong ]
[ $arch == simdbc64 && ($compiler == dartk || $compiler == dartkb) && $mode == debug && $runtime == vm && $strong ]
isolate/isolate_complex_messages_test: Crash # http://dartbug.com/33128
[ $arch == x64 && $compiler == dartk && $mode == debug && $runtime == vm && $strong ]
[ $arch == x64 && ($compiler == dartk || $compiler == dartkb) && $mode == debug && $runtime == vm && $strong ]
mirrors/invocation_fuzz_test: Skip # Because it times out, issue 29439.
[ $builder_tag == optimization_counter_threshold && $compiler == dartk ]
[ $builder_tag == optimization_counter_threshold && ($compiler == dartk || $compiler == dartkb) ]
isolate/unresolved_ports_test: CompileTimeError, Pass, Timeout # Fails to compile on opt counter builder (#31838)
mirrors/invocation_fuzz_test/emptyarray: Pass, Crash, RuntimeError # Flaky on vm-kernel-optcounter-threshold-linux-release-x64, bug #31838
mirrors/invocation_fuzz_test/false: Pass, Crash, RuntimeError # Flaky on vm-kernel-optcounter-threshold-linux-release-x64, bug #31838
@ -73,22 +73,22 @@ isolate/browser/package_resolve_browser_hook2_test: CompileTimeError
isolate/browser/package_resolve_browser_hook_test: CompileTimeError
isolate/browser/package_resolve_browser_test: CompileTimeError
[ $compiler == dartk && $mode == debug && $runtime == vm && $strong ]
[ ($compiler == dartk || $compiler == dartkb) && $mode == debug && $runtime == vm && $strong ]
mirrors/other_declarations_location_test: Crash # Issue 33325 (assertion error, TypeParameter not having position).
[ $compiler == dartk && $mode == debug && $hot_reload_rollback ]
[ ($compiler == dartk || $compiler == dartkb) && $mode == debug && $hot_reload_rollback ]
isolate/message3_test/constList_identical: Skip # Timeout
[ $compiler == dartk && $mode == debug && $strong ]
[ ($compiler == dartk || $compiler == dartkb) && $mode == debug && $strong ]
mirrors/variable_is_const_test/01: Crash # Issue 32326
[ $compiler == dartk && $runtime == vm && $checked && $strong ]
[ ($compiler == dartk || $compiler == dartkb) && $runtime == vm && $checked && $strong ]
mirrors/redirecting_factory_different_type_test/01: MissingCompileTimeError # Issue 28424
mirrors/redirecting_factory_different_type_test/none: RuntimeError # Issue 28424
mirrors/reflected_type_generics_test/02: Pass
# ===== dartk + vm status lines =====
[ $compiler == dartk && $runtime == vm && $strong ]
[ ($compiler == dartk || $compiler == dartkb) && $runtime == vm && $strong ]
async/slow_consumer2_test: CompileTimeError # Issue 31402 (Invocation arguments)
async/stream_controller_async_test: CompileTimeError # Issue 31402 (Invocation arguments)
async/stream_join_test: CompileTimeError # Issue 31402 (Invocation arguments)
@ -191,14 +191,14 @@ mirrors/typedef_reflected_type_test/none: RuntimeError
mirrors/typedef_test: RuntimeError
mirrors/typevariable_mirror_metadata_test: RuntimeError
[ $compiler == dartk && $system == windows ]
[ ($compiler == dartk || $compiler == dartkb) && $system == windows ]
isolate/ping_pause_test: Skip # Issues 32137 and 32138
[ $compiler == dartk && $hot_reload_rollback ]
[ ($compiler == dartk || $compiler == dartkb) && $hot_reload_rollback ]
isolate/illegal_msg_function_test: Skip # Timeout
isolate/pause_test: Skip # Timeout
[ $compiler == dartk && $strong ]
[ ($compiler == dartk || $compiler == dartkb) && $strong ]
async/slow_consumer2_test: RuntimeError # Issue 31402 (Invocation arguments)
async/stream_controller_async_test: RuntimeError
async/stream_distinct_test: RuntimeError
@ -229,7 +229,7 @@ mirrors/top_level_accessors_test/01: MissingCompileTimeError
# Enabling of dartk for sim{arm,arm64,dbc64} revealed these test failures, which
# are to be triaged. Isolate tests are skipped on purpose due to the usage of
# batch mode.
[ $compiler == dartk && $strong && ($arch == simarm || $arch == simarm64 || $arch == simdbc64) ]
[ ($compiler == dartk || $compiler == dartkb) && $strong && ($arch == simarm || $arch == simarm64 || $arch == simdbc64) ]
isolate/cross_isolate_message_test: Skip # No support for Isolate.spawnUri in batch-mode atm.
isolate/error_at_spawnuri_test: Skip # No support for Isolate.spawnUri in batch-mode atm.
isolate/error_exit_at_spawnuri_test: Skip # No support for Isolate.spawnUri in batch-mode atm.
@ -253,10 +253,10 @@ isolate/unresolved_ports_test: Skip # No support for Isolate.spawnUri in batch-m
mirrors/library_uri_io_test: RuntimeError # Please triage.
# ===== Skip dartk and darkp in !$strong mode ====
[ $compiler == dartk && !$strong ]
[ ($compiler == dartk || $compiler == dartkb) && !$strong ]
*: SkipByDesign
[ $compiler == dartk && ($hot_reload || $hot_reload_rollback) ]
[ ($compiler == dartk || $compiler == dartkb) && ($hot_reload || $hot_reload_rollback) ]
async/stream_from_iterable_test: Skip # Timeout
async/stream_iterator_test: Skip # Timeout
async/stream_periodic2_test: Skip # Timeout
@ -356,7 +356,7 @@ typed_data/float32x4_static_test: MissingCompileTimeError
typed_data/int32x4_static_test/01: MissingCompileTimeError
typed_data/int32x4_static_test/02: MissingCompileTimeError
[ $compiler == app_jitk || $compiler == dartk || $compiler == dartkp ]
[ $compiler == app_jitk || ($compiler == dartk || $compiler == dartkb) || $compiler == dartkp ]
html/*: SkipByDesign
isolate/browser/*: SkipByDesign
js/*: SkipByDesign

View file

@ -17,7 +17,7 @@ convert/streamed_conversion_json_utf8_decode_test: Skip # Verification not yet i
[ $arch == simarm64 && $runtime == vm ]
convert/utf85_test: Skip # Pass, Slow Issue 20111.
[ $compiler != app_jitk && $compiler != dartk && $runtime == vm ]
[ $compiler != app_jitk && $compiler != dartk && $compiler != dartkb && $runtime == vm ]
convert/streamed_conversion_json_utf8_decode_test: Pass, Slow # Infrequent timeouts.
html/*: SkipByDesign # dart:html not supported on VM.
js/datetime_roundtrip_test: CompileTimeError
@ -35,13 +35,13 @@ mirrors/mirrors_used*: SkipByDesign # Invalid tests. MirrorsUsed does not have a
mirrors/native_class_test: SkipByDesign # Imports dart:html
mirrors/redirecting_factory_different_type_test/01: MissingCompileTimeError
[ $compiler != app_jitk && $compiler != dartk && $runtime == vm && !$checked ]
[ $compiler != app_jitk && $compiler != dartk && $compiler != dartkb && $runtime == vm && !$checked ]
mirrors/inference_and_no_such_method_test: RuntimeError
[ $compiler != app_jitk && $compiler != dartk && $runtime == vm && $strong ]
[ $compiler != app_jitk && $compiler != dartk && $compiler != dartkb && $runtime == vm && $strong ]
async/future_or_only_in_async_test/00: MissingCompileTimeError
[ $compiler != dartk && $runtime == vm && !$strong ]
[ $compiler != dartk && $compiler != dartkb && $runtime == vm && !$strong ]
mirrors/reflect_class_test/01: MissingCompileTimeError
mirrors/reflect_class_test/02: MissingCompileTimeError
mirrors/reflected_type_classes_test/01: MissingCompileTimeError

View file

@ -77,7 +77,7 @@ io/compile_all_test: Skip # Incompatible flag --compile_all
# We skip all the Dart 1.0 tests in dartk and dartkp mode as these
# modes are intended only for Dart 2.0 with strong mode enabled.
[ $compiler == app_jitk || $compiler == dartk || $compiler == dartkp ]
[ $compiler == app_jitk || $compiler == dartk || $compiler == dartkb || $compiler == dartkp ]
*: SkipByDesign
[ $compiler == dart2js || $compiler == dartdevc ]

View file

@ -75,7 +75,7 @@ float_array_static_test: MissingCompileTimeError
io/*: Skip # Issue 30618
# All static_tests have expected compile-time errors.
[ $compiler != app_jitk && $compiler != dart2analyzer && $compiler != dartdevc && $compiler != dartk && $compiler != dartkp && $runtime != none && $strong ]
[ $compiler != app_jitk && $compiler != dart2analyzer && $compiler != dartdevc && $compiler != dartk && $compiler != dartkb && $compiler != dartkp && $runtime != none && $strong ]
float_array_static_test: MissingCompileTimeError
[ $compiler == none && $runtime == vm && $system == fuchsia ]
@ -107,7 +107,7 @@ io/secure_server_client_certificate_test: Skip # Re-enable once the bots have be
io/socket_connect_stream_data_close_cancel_test: Pass, Timeout # Issue 27453
io/socket_many_connections_test: Skip # This test fails with "Too many open files" on the Mac OS buildbot. This is expected as MacOS by default runs with a very low number of allowed open files ('ulimit -n' says something like 256).
[ $strong && ($compiler == dartk || $compiler == dartkp) ]
[ $strong && ($compiler == dartk || $compiler == dartkb || $compiler == dartkp) ]
io/directory_test: RuntimeError
io/file_error_test: RuntimeError
io/file_test: RuntimeError
@ -126,7 +126,7 @@ io/web_socket_pipe_test: RuntimeError
io/web_socket_protocol_processor_test: CompileTimeError
io/zlib_test: RuntimeError
[ !$strong && ($compiler == dartk || $compiler == dartkp) ]
[ !$strong && ($compiler == dartk || $compiler == dartkb || $compiler == dartkp) ]
io/compile_all_test: Skip # Crashes
io/http_client_connect_test: Skip # Flaky.
io/http_content_length_test: Skip # Flaky.

View file

@ -46,16 +46,16 @@ package/scenarios/invalid/same_package_twice_test: CompileTimeError
package/scenarios/invalid/invalid_utf8_test: CompileTimeError # Issue 32085
package/scenarios/invalid/non_existent_packages_file_test: CompileTimeError # Issue 32085
[ $arch == simarm64 && $compiler == dartk && $strong ]
[ $arch == simarm64 && ($compiler == dartk || $compiler == dartkb) && $strong ]
io/http_bind_test: Pass, Slow
[ $builder_tag == optimization_counter_threshold && $compiler == dartk ]
[ $builder_tag == optimization_counter_threshold && ($compiler == dartk || $compiler == dartkb) ]
map_insert_remove_oom_test: Skip # Heap limit too low.
[ $compiler == app_jitk && ($mode == debug || $mode == release) ]
dart_developer_disabled_env_test: RuntimeError
[ $compiler == dartk && $mode == debug && $runtime == vm && $strong ]
[ ($compiler == dartk || $compiler == dartkb) && $mode == debug && $runtime == vm && $strong ]
io/file_lock_test: Slow, Pass
io/raw_socket_test: Crash
io/socket_exception_test: Pass, Crash
@ -64,10 +64,10 @@ io/socket_info_ipv4_test: Pass, Crash
io/socket_info_ipv6_test: Pass, Crash
io/socket_port_test: Pass, Crash
[ $compiler == dartk && $mode == debug && $hot_reload ]
[ ($compiler == dartk || $compiler == dartkb) && $mode == debug && $hot_reload ]
io/web_socket_ping_test: Crash, Pass
[ $compiler == dartk && $runtime == vm && $strong ]
[ ($compiler == dartk || $compiler == dartkb) && $runtime == vm && $strong ]
io/http_client_request_test: Pass, Timeout
io/http_compression_test: RuntimeError
io/platform_resolved_executable_test/03: Pass, RuntimeError
@ -78,28 +78,28 @@ no_support_debugger_test: Skip # kernel-service snapshot not compatible with fla
regress_29350_test: MissingCompileTimeError
regress_29350_test/none: Pass # Issue 31537
[ $compiler == dartk && $system == windows ]
[ ($compiler == dartk || $compiler == dartkb) && $system == windows ]
io/secure_builtin_roots_test: Skip # Issues 32137 and 32138.
io/test_extension_fail_test: RuntimeError, Pass # Issue 32137.
io/test_extension_test: RuntimeError, Pass # Issue 32137.
io/wait_for_event_isolate_test: Skip # Issues 32137 and 32138.
[ $compiler == dartk && $system == windows && $strong ]
[ ($compiler == dartk || $compiler == dartkb) && $system == windows && $strong ]
io/compile_all_test: Pass, Fail # Possibly related to issue 32373
map_insert_remove_oom_test: Skip # Heap limit too low.
[ $compiler == dartk && $hot_reload ]
[ ($compiler == dartk || $compiler == dartkb) && $hot_reload ]
io/http_no_reason_phrase_test: Pass, Crash
io/http_outgoing_size_test: Pass, Crash
[ $compiler == dartk && $hot_reload_rollback ]
[ ($compiler == dartk || $compiler == dartkb) && $hot_reload_rollback ]
io/directory_chdir_test: Skip # Timeout
io/echo_server_stream_test: Pass, Slow
# Enabling of dartk for sim{arm,arm64,dbc64} revelaed these test failures, which
# are to be triaged. Isolate tests are skipped on purpose due to the usage of
# batch mode.
[ $compiler == dartk && $strong && ($arch == simarm || $arch == simarm64 || $arch == simdbc64) ]
[ ($compiler == dartk || $compiler == dartkb) && $strong && ($arch == simarm || $arch == simarm64 || $arch == simdbc64) ]
fragmentation_test: Timeout, Pass
io/dart_std_io_pipe_test: Timeout, Pass
io/directory_list_sync_test: Timeout, Pass # Please triage.
@ -115,10 +115,10 @@ package/scenarios/packages_file_strange_formatting/mixed_line_ends_test: Compile
package/scenarios/packages_option_only/packages_option_only_test: CompileTimeError # Please triage.
# ===== Skip dartk and darkp in !$strong mode ====
[ $compiler == dartk && !$strong ]
[ ($compiler == dartk || $compiler == dartkb) && !$strong ]
*: SkipByDesign
[ $compiler == dartk && ($hot_reload || $hot_reload_rollback) ]
[ ($compiler == dartk || $compiler == dartkb) && ($hot_reload || $hot_reload_rollback) ]
io/addlatexhash_test: Skip # Timeout
io/http_advanced_test: Skip # Timeout
io/http_auth_digest_test: Crash
@ -196,7 +196,7 @@ io/http_parser_test: CompileTimeError
io/secure_socket_argument_test: CompileTimeError
io/web_socket_protocol_processor_test: CompileTimeError
[ $system != windows && $strong && ($compiler == dartk || $compiler == dartkp) ]
[ $system != windows && $strong && ($compiler == dartk || $compiler == dartkb || $compiler == dartkp) ]
io/named_pipe_script_test: RuntimeError # Issue 33842
[ $fasta && $strong ]
@ -205,5 +205,5 @@ package/package_isolate_test: CompileTimeError
[ $fasta && !$strong ]
regress_29350_test/none: MissingCompileTimeError
[ !$strong && ($compiler == dartk || $compiler == dartkp || $runtime == dart_precompiled || $runtime == vm) ]
[ !$strong && ($compiler == dartk || $compiler == dartkb || $compiler == dartkp || $runtime == dart_precompiled || $runtime == vm) ]
*: SkipByDesign # standalone_2 is only supported in strong mode.

View file

@ -26,31 +26,35 @@ This script invokes ninja to build Dart.
def BuildOptions():
result = optparse.OptionParser(usage=usage)
result.add_option("-m", "--mode",
help='Build variants (comma-separated).',
metavar='[all,debug,release,product]',
default='debug')
result.add_option("-v", "--verbose",
help='Verbose output.',
default=False, action="store_true")
result.add_option("-a", "--arch",
help='Target architectures (comma-separated).',
metavar='[all,ia32,x64,simarm,arm,simarmv6,armv6,simarmv5te,armv5te,'
'simarm64,arm64,simdbc,armsimdbc]',
default=utils.GuessArchitecture())
result.add_option("--os",
help='Target OSs (comma-separated).',
metavar='[all,host,android]',
default='host')
result.add_option("-b", "--bytecode",
help='Build with the kernel bytecode interpreter',
default=False,
action='store_true')
result.add_option("-j",
type=int,
help='Ninja -j option for Goma builds.',
metavar=1000,
default=1000)
result.add_option("-m", "--mode",
help='Build variants (comma-separated).',
metavar='[all,debug,release,product]',
default='debug')
result.add_option("--no-start-goma",
help="Don't try to start goma",
default=False,
action='store_true')
result.add_option("--os",
help='Target OSs (comma-separated).',
metavar='[all,host,android]',
default='host')
result.add_option("-v", "--verbose",
help='Verbose output.',
default=False, action="store_true")
return result
@ -224,9 +228,9 @@ def EnsureGomaStarted(out_dir):
# Returns a tuple (build_config, command to run, whether goma is used)
def BuildOneConfig(options, targets, target_os, mode, arch):
build_config = utils.GetBuildConf(mode, arch, target_os)
out_dir = utils.GetBuildRoot(HOST_OS, mode, arch, target_os)
def BuildOneConfig(options, targets, target_os, mode, arch, kbc):
build_config = utils.GetBuildConf(mode, arch, target_os, kbc=kbc)
out_dir = utils.GetBuildRoot(HOST_OS, mode, arch, target_os, kbc=kbc)
using_goma = False
# TODO(zra): Remove auto-run of gn, replace with prompt for user to run
# gn.py manually.
@ -291,7 +295,8 @@ def Main():
for target_os in options.os:
for mode in options.mode:
for arch in options.arch:
configs.append(BuildOneConfig(options, targets, target_os, mode, arch))
configs.append(BuildOneConfig(options, targets, target_os, mode, arch,
options.bytecode))
# Build regular configs.
goma_builds = []

View file

@ -64,8 +64,8 @@ def GetGNArgs(args):
return args.split()
def GetOutDir(mode, arch, target_os):
return utils.GetBuildRoot(HOST_OS, mode, arch, target_os)
def GetOutDir(mode, arch, target_os, kbc):
return utils.GetBuildRoot(HOST_OS, mode, arch, target_os, kbc=kbc)
def ToCommandLine(gn_args):
@ -95,7 +95,7 @@ def TargetCpuForArch(arch, target_os):
return 'x64'
if arch == 'simdbc':
return 'arm' if target_os == 'android' else 'x86'
if arch == 'simdbc64':
if arch in ['simdbc64']:
return 'arm64' if target_os == 'android' else 'x64'
if arch == 'armsimdbc':
return 'arm'
@ -174,6 +174,9 @@ def ToGnArgs(args, mode, arch, target_os):
gn_args['target_cpu'] = TargetCpuForArch(arch, target_os)
gn_args['dart_target_arch'] = DartTargetCpuForArch(arch)
if args.bytecode:
gn_args['dart_use_interpreter'] = True
if arch != HostCpuForArch(arch):
# Training an app-jit snapshot under a simulator is slow. Use script
# snapshots instead.
@ -342,6 +345,10 @@ def parse_args(args):
metavar='[all,ia32,x64,simarm,arm,simarmv6,armv6,simarmv5te,armv5te,'
'simarm64,arm64,simdbc,armsimdbc]',
default='x64')
common_group.add_argument('--bytecode', '-b',
help='Configure with the kernel bytecode interpreter',
default=False,
action="store_true")
common_group.add_argument('--mode', '-m',
type=str,
help='Build variants (comma-separated).',
@ -481,7 +488,7 @@ def Main(argv):
for target_os in args.os:
for mode in args.mode:
for arch in args.arch:
out_dir = GetOutDir(mode, arch, target_os)
out_dir = GetOutDir(mode, arch, target_os, args.bytecode)
# TODO(infra): Re-enable --check. Many targets fail to use
# public_deps to re-expose header files to their dependents.
# See dartbug.com/32364

View file

@ -79,6 +79,9 @@ abstract class CompilerConfiguration {
}
return new NoneCompilerConfiguration(configuration);
case Compiler.dartkb:
return new VMKernelCompilerConfiguration(configuration);
case Compiler.dartkp:
return new PrecompilerCompilerConfiguration(configuration);
@ -1117,6 +1120,10 @@ abstract class VMKernelCompilerMixin {
args.add('--enable_asserts');
}
if (_configuration.useKernelBytecode) {
args.add('--gen-bytecode');
}
return Command.vmKernelCompilation(dillFile, true, bootstrapDependencies(),
genKernel, args, environmentOverrides);
}

View file

@ -53,6 +53,7 @@ class Configuration {
this.useEnableAsserts,
this.useDart2JSWithKernel,
this.useDart2JSOldFrontend,
this.useKernelBytecode,
this.writeDebugLog,
this.writeTestOutcomeLog,
this.writeResultLog,
@ -124,6 +125,7 @@ class Configuration {
final bool useEnableAsserts;
final bool useDart2JSWithKernel;
final bool useDart2JSOldFrontend;
final bool useKernelBytecode;
final bool writeDebugLog;
final bool writeTestOutcomeLog;
final bool writeResultLog;
@ -186,6 +188,7 @@ class Configuration {
Compiler.appJitk,
Compiler.dartdevk,
Compiler.dartk,
Compiler.dartkb,
Compiler.dartkp,
Compiler.fasta,
];
@ -426,9 +429,10 @@ class Configuration {
var os = '';
if (system == System.android) os = "Android";
var kbc = useKernelBytecode ? 'KBC' : '';
var arch = architecture.name.toUpperCase();
var normal = '$modeName$os$arch';
var cross = '$modeName${os}X$arch';
var normal = '$modeName$os$arch$kbc';
var cross = '$modeName${os}X$arch$kbc';
var outDir = system.outputDirectory;
var normalDir = new Directory(new Path('$outDir$normal').toNativePath());
var crossDir = new Directory(new Path('$outDir$cross').toNativePath());
@ -477,7 +481,8 @@ class Configuration {
'batch': batch,
'batch_dart2js': batchDart2JS,
'reset_browser_configuration': resetBrowser,
'selectors': selectors.keys.toList()
'selectors': selectors.keys.toList(),
'use_kernel_bytecode': useKernelBytecode,
};
}
return _summaryMap;
@ -512,7 +517,7 @@ class Architecture {
simarmv5te,
simarm64,
simdbc,
simdbc64
simdbc64,
], key: (architecture) => (architecture as Architecture).name);
static Architecture find(String name) {
@ -539,6 +544,7 @@ class Compiler {
static const appJit = const Compiler._('app_jit');
static const appJitk = const Compiler._('app_jitk');
static const dartk = const Compiler._('dartk');
static const dartkb = const Compiler._('dartkb');
static const dartkp = const Compiler._('dartkp');
static const specParser = const Compiler._('spec_parser');
static const fasta = const Compiler._('fasta');
@ -555,6 +561,7 @@ class Compiler {
appJit,
appJitk,
dartk,
dartkb,
dartkp,
specParser,
fasta,
@ -610,6 +617,8 @@ class Compiler {
case Compiler.appJitk:
case Compiler.dartk:
return const [Runtime.vm, Runtime.selfCheck];
case Compiler.dartkb:
return const [Runtime.vm, Runtime.selfCheck];
case Compiler.precompiler:
case Compiler.dartkp:
return const [Runtime.dartPrecompiled];
@ -643,6 +652,7 @@ class Compiler {
case Compiler.appJit:
case Compiler.appJitk:
case Compiler.dartk:
case Compiler.dartkb:
return Runtime.vm;
case Compiler.precompiler:
case Compiler.dartkp:

View file

@ -98,6 +98,7 @@ dart2analyzer: Perform static analysis on Dart code using the analyzer.
app_jit: Compile the Dart code into an app snapshot.
app_jitk: Compile the Dart code into Kernel and then into an app snapshot.
dartk: Compile the Dart code into Kernel before running test.
dartkb: Compile the Dart code into Kernel with bytecode before running test.
dartkp: Compile the Dart code into Kernel and then Kernel into AOT
snapshot before running the test.
spec_parser: Parse Dart code using the specification parser.''',
@ -675,6 +676,7 @@ compiler.''',
useEnableAsserts: data["enable_asserts"] as bool,
useDart2JSWithKernel: data["dart2js_with_kernel"] as bool,
useDart2JSOldFrontend: data["dart2js_old_frontend"] as bool,
useKernelBytecode: compiler == Compiler.dartkb,
writeDebugLog: data["write_debug_log"] as bool,
writeTestOutcomeLog: data["write_test_outcome_log"] as bool,
writeResultLog: data["write_result_log"] as bool,

View file

@ -18,7 +18,9 @@ import 'test_suite.dart';
/// shared between multiple test cases, it should not be mutated after
/// construction.
abstract class RuntimeConfiguration {
factory RuntimeConfiguration(Configuration configuration) {
Configuration _configuration;
static RuntimeConfiguration _makeInstance(Configuration configuration) {
switch (configuration.runtime) {
case Runtime.contentShellOnAndroid:
case Runtime.chrome:
@ -63,10 +65,14 @@ abstract class RuntimeConfiguration {
case Runtime.selfCheck:
return new SelfCheckRuntimeConfiguration();
}
throw "unreachable";
}
factory RuntimeConfiguration(Configuration configuration) {
return _makeInstance(configuration)
.._configuration = configuration;
}
RuntimeConfiguration._subclass();
int timeoutMultiplier(
@ -186,6 +192,10 @@ class DartVmRuntimeConfiguration extends RuntimeConfiguration {
break;
}
if (_configuration.compiler == Compiler.dartkb) {
multiplier *= 4;
}
if (mode.isDebug) {
multiplier *= 2;
if (isReload) {
@ -231,11 +241,18 @@ class StandaloneDartRuntimeConfiguration extends DartVmRuntimeConfiguration {
throw "Dart VM cannot run files of type '$type'.";
}
List<String> args = arguments;
if (suite.configuration.compiler == Compiler.dartkb) {
args.removeWhere(
(String arg) => arg.startsWith('--optimization-counter-threshold'));
args = <String>['--optimization-counter-threshold=-1']..addAll(args);
}
String executable = suite.dartVmBinaryFileName;
if (type == 'application/kernel-ir-fully-linked') {
executable = suite.dartVmExecutableFileName;
}
return [Command.vm(executable, arguments, environmentOverrides)];
return [Command.vm(executable, args, environmentOverrides)];
}
}

View file

@ -170,7 +170,8 @@ Future testConfigurations(List<Configuration> configurations) async {
if (['co19', 'co19_2'].contains(key)) {
testSuites.add(new Co19TestSuite(configuration, key));
} else if ((configuration.compiler == Compiler.none ||
configuration.compiler == Compiler.dartk) &&
configuration.compiler == Compiler.dartk ||
configuration.compiler == Compiler.dartkb) &&
configuration.runtime == Runtime.vm &&
key == 'vm') {
// vm tests contain both cc tests (added here) and dart tests (added

View file

@ -1608,6 +1608,7 @@ class StandardTestSuite extends TestSuite {
const compilers = const [
Compiler.none,
Compiler.dartk,
Compiler.dartkb,
Compiler.dartkp,
Compiler.precompiler,
Compiler.appJit

View file

@ -444,6 +444,7 @@ class TestUtils {
if (configuration.compiler == Compiler.appJit ||
configuration.compiler == Compiler.precompiler ||
configuration.compiler == Compiler.dartk ||
configuration.compiler == Compiler.dartkb ||
configuration.compiler == Compiler.dartkp) {
var checked = configuration.isChecked ? '-checked' : '';
var legacy = configuration.noPreviewDart2 ? '-legacy' : '';

View file

@ -293,26 +293,32 @@ def IsCrossBuild(target_os, arch):
(target_os != GuessOS()))
def GetBuildConf(mode, arch, conf_os=None):
def GetBuildConf(mode, arch, conf_os=None, kbc=False):
kbc_suffix = ''
if kbc:
kbc_suffix = 'KBC'
if conf_os == 'android':
return '%s%s%s' % (GetBuildMode(mode), conf_os.title(), arch.upper())
return '%s%s%s%s' % (GetBuildMode(mode), conf_os.title(), arch.upper(),
kbc_suffix)
else:
# Ask for a cross build if the host and target architectures don't match.
host_arch = ARCH_GUESS
cross_build = ''
if GetArchFamily(host_arch) != GetArchFamily(arch):
cross_build = 'X'
return '%s%s%s' % (GetBuildMode(mode), cross_build, arch.upper())
return '%s%s%s%s' % (GetBuildMode(mode), cross_build, arch.upper(),
kbc_suffix)
def GetBuildDir(host_os):
return BUILD_ROOT[host_os]
def GetBuildRoot(host_os, mode=None, arch=None, target_os=None):
def GetBuildRoot(host_os, mode=None, arch=None, target_os=None, kbc=False):
build_root = GetBuildDir(host_os)
if mode:
build_root = os.path.join(build_root, GetBuildConf(mode, arch, target_os))
build_root = os.path.join(build_root,
GetBuildConf(mode, arch, target_os, kbc))
return build_root