From ef8baa8760a8699c4e155adec54572e9d6e16425 Mon Sep 17 00:00:00 2001 From: Ryan Macnak Date: Thu, 26 May 2016 10:37:47 -0700 Subject: [PATCH] Add test harness option for app snapshots with unoptimized code. ./tools/test.py -m all -c dart2appjit -r dart_app --use-blobs Rename 'dart_product' runtime to 'dart_app'. Rename Dart_PrecompiledJITSnapshotBlob to Dart_CreateAppJITSnapshot and add documentation. Remove out-of-date scripts in tools/precompilation. R=fschneider@google.com Review URL: https://codereview.chromium.org/1992703005 . --- pkg/pkg.status | 2 +- runtime/bin/main.cc | 2 +- runtime/include/dart_api.h | 31 +++++++++++- .../observatory/tests/service/service.status | 2 +- runtime/tests/vm/vm.status | 2 +- runtime/vm/dart_api_impl.cc | 32 +++++++++--- samples/samples.status | 2 +- tests/benchmark_smoke/benchmark_smoke.status | 2 +- tests/co19/co19-runtime.status | 24 ++++----- tests/corelib/corelib.status | 14 +++--- tests/html/html.status | 2 +- tests/isolate/isolate.status | 49 +++++++++++++------ tests/language/language.status | 28 +++++------ tests/lib/lib.status | 14 +++--- tests/standalone/standalone.status | 28 ++++++----- tools/precompilation/test_linux.sh | 15 ------ tools/precompilation/test_linux_simarm.sh | 15 ------ tools/precompilation/test_macos.sh | 15 ------ .../testing/dart/compiler_configuration.dart | 34 +++++++++++++ tools/testing/dart/runtime_configuration.dart | 14 ++++-- tools/testing/dart/test_options.dart | 13 +++-- tools/testing/dart/test_suite.dart | 8 +-- 22 files changed, 206 insertions(+), 142 deletions(-) delete mode 100755 tools/precompilation/test_linux.sh delete mode 100755 tools/precompilation/test_linux_simarm.sh delete mode 100755 tools/precompilation/test_macos.sh diff --git a/pkg/pkg.status b/pkg/pkg.status index a78a08d6ccc..9fa46517a54 100644 --- a/pkg/pkg.status +++ b/pkg/pkg.status @@ -267,7 +267,7 @@ analyzer/test/src/task/strong/inferred_type_test: Crash # Issue 24485 analyzer/test/src/task/strong_mode_test: Crash # Issue 24485 analyzer/test/src/task/yaml_test: Crash # Issue 24485 -[ $noopt || $runtime == dart_precompiled || $runtime == dart_product ] +[ $noopt || $runtime == dart_precompiled || $runtime == dart_app ] *: SkipByDesign # The pkg test framework imports dart:mirrors. [ $compiler == dart2js && $cps_ir && $checked ] diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc index 5ab2826b7c2..8823eda6227 100644 --- a/runtime/bin/main.cc +++ b/runtime/bin/main.cc @@ -1232,7 +1232,7 @@ static void GeneratePrecompiledJITSnapshot() { intptr_t instructions_blob_size = 0; uint8_t* rodata_blob_buffer = NULL; intptr_t rodata_blob_size = 0; - Dart_Handle result = Dart_CreatePrecompiledJITSnapshotBlob( + Dart_Handle result = Dart_CreateAppJITSnapshot( &vm_isolate_buffer, &vm_isolate_size, &isolate_buffer, diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h index bc8c474ddc2..d019d4fcea5 100755 --- a/runtime/include/dart_api.h +++ b/runtime/include/dart_api.h @@ -2960,7 +2960,6 @@ DART_EXPORT Dart_Handle Dart_Precompile( /** * Creates a precompiled snapshot. - * - The VM must not have been started from a snapshot. * - A root library must have been loaded. * - Dart_Precompile must have been called. * @@ -2972,6 +2971,11 @@ DART_EXPORT Dart_Handle Dart_Precompile( * The vm isolate snapshot, kInstructionsSnapshot and kDataSnapshot should be * passed as arguments to Dart_Initialize. The isolate snapshot should be * passed to Dart_CreateIsolate. + * + * The buffers are scope allocated and are only valid until the next call to + * Dart_ExitScope. + * + * \return A valid handle if no error occurs during the operation. */ DART_EXPORT Dart_Handle Dart_CreatePrecompiledSnapshotAssembly( uint8_t** vm_isolate_snapshot_buffer, @@ -3002,7 +3006,30 @@ DART_EXPORT Dart_Handle Dart_CreatePrecompiledSnapshotBlob( DART_EXPORT Dart_Handle Dart_PrecompileJIT(); -DART_EXPORT Dart_Handle Dart_CreatePrecompiledJITSnapshotBlob( +/** + * Creates a snapshot that caches unoptimized code and type feedback for faster + * startup and quicker warmup in a subsequent process. + * + * Outputs a snapshot in four pieces. The vm isolate snapshot, + * instructions_blob and rodata_blob should be passed as arguments to + * Dart_Initialize. The isolate snapshot should be passed to + * Dart_CreateIsolate. The instructions piece must be loaded with execute + * permissions; the other pieces may loaded as read-only. + * + * - Requires the VM to have been started with --load-deferred-eagerly. + * - Requires the VM to have not been started with --precompilation. + * - Not supported when targeting IA32. + * - The VM writing the snapshot and the VM reading the snapshot must be the + * same version, must be built in the same DEBUG/RELEASE/PRODUCT mode, must + * be targeting the same architecture, and must both be in checked mode or + * both in unchecked mode. + * + * The buffers are scope allocated and are only valid until the next call to + * Dart_ExitScope. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_CreateAppJITSnapshot( uint8_t** vm_isolate_snapshot_buffer, intptr_t* vm_isolate_snapshot_size, uint8_t** isolate_snapshot_buffer, diff --git a/runtime/observatory/tests/service/service.status b/runtime/observatory/tests/service/service.status index 3ec12e90b9a..31ffa215507 100644 --- a/runtime/observatory/tests/service/service.status +++ b/runtime/observatory/tests/service/service.status @@ -44,7 +44,7 @@ coverage_test: Pass, Slow *: SkipByDesign # Service protocol is not supported when running a full application snapshot. -[ $runtime == dart_product ] +[ $runtime == dart_app ] *: SkipByDesign [ $compiler == dart2analyzer ] diff --git a/runtime/tests/vm/vm.status b/runtime/tests/vm/vm.status index 8c08954e8da..e34859da426 100644 --- a/runtime/tests/vm/vm.status +++ b/runtime/tests/vm/vm.status @@ -103,7 +103,7 @@ cc/StandaloneSnapshotSize: SkipByDesign # Imports dart:mirrors dart/inline_stack_frame_test: Pass, RuntimeError dart/optimized_stacktrace_test: Pass, RuntimeError -[ $runtime == dart_product || $runtime == dart_precompiled ] +[ $runtime == dart_app || $runtime == dart_precompiled ] dart/data_uri_spawn_test: SkipByDesign # Isolate.spawnUri dart/optimized_stacktrace_test: SkipByDesign # Requires line numbers diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc index eed7789bca8..95ae6489578 100644 --- a/runtime/vm/dart_api_impl.cc +++ b/runtime/vm/dart_api_impl.cc @@ -1463,7 +1463,7 @@ DART_EXPORT Dart_Handle Dart_CreateSnapshot( API_TIMELINE_DURATION; Isolate* I = T->isolate(); if (!FLAG_load_deferred_eagerly) { - return Dart_NewApiError( + return Api::NewError( "Creating full snapshots requires --load_deferred_eagerly"); } if (vm_isolate_snapshot_buffer != NULL && @@ -6131,10 +6131,13 @@ DART_EXPORT Dart_Handle Dart_CreatePrecompiledSnapshotBlob( DART_EXPORT Dart_Handle Dart_Precompile( Dart_QualifiedFunctionName entry_points[], bool reset_fields) { +#if defined(TARGET_ARCH_IA32) + return Api::NewError("Precompilation is not supported on IA32."); +#else API_TIMELINE_BEGIN_END; DARTSCOPE(Thread::Current()); if (!FLAG_precompiled_mode) { - return Dart_NewApiError("Flag --precompilation was not specified."); + return Api::NewError("Flag --precompilation was not specified."); } Dart_Handle result = Api::CheckAndFinalizePendingClasses(T); if (::Dart_IsError(result)) { @@ -6147,6 +6150,7 @@ DART_EXPORT Dart_Handle Dart_Precompile( return Api::NewHandle(T, error.raw()); } return Api::Success(); +#endif } @@ -6157,12 +6161,15 @@ DART_EXPORT Dart_Handle Dart_CreatePrecompiledSnapshotAssembly( intptr_t* isolate_snapshot_size, uint8_t** assembly_buffer, intptr_t* assembly_size) { +#if defined(TARGET_ARCH_IA32) + return Api::NewError("Snapshots with code are not supported on IA32."); +#else API_TIMELINE_DURATION; DARTSCOPE(Thread::Current()); Isolate* I = T->isolate(); if (I->compilation_allowed()) { - return Dart_NewApiError("Isolate is not precompiled. " - "Did you forget to call Dart_Precompile?"); + return Api::NewError("Isolate is not precompiled. " + "Did you forget to call Dart_Precompile?"); } ASSERT(FLAG_load_deferred_eagerly); if (vm_isolate_snapshot_buffer == NULL) { @@ -6201,6 +6208,7 @@ DART_EXPORT Dart_Handle Dart_CreatePrecompiledSnapshotAssembly( *assembly_size = instructions_writer.AssemblySize(); return Api::Success(); +#endif } @@ -6213,12 +6221,15 @@ DART_EXPORT Dart_Handle Dart_CreatePrecompiledSnapshotBlob( intptr_t* instructions_blob_size, uint8_t** rodata_blob_buffer, intptr_t* rodata_blob_size) { +#if defined(TARGET_ARCH_IA32) + return Api::NewError("Snapshots with code are not supported on IA32."); +#else API_TIMELINE_DURATION; DARTSCOPE(Thread::Current()); Isolate* I = T->isolate(); if (I->compilation_allowed()) { - return Dart_NewApiError("Isolate is not precompiled. " - "Did you forget to call Dart_Precompile?"); + return Api::NewError("Isolate is not precompiled. " + "Did you forget to call Dart_Precompile?"); } ASSERT(FLAG_load_deferred_eagerly); if (vm_isolate_snapshot_buffer == NULL) { @@ -6265,6 +6276,7 @@ DART_EXPORT Dart_Handle Dart_CreatePrecompiledSnapshotBlob( *rodata_blob_size = instructions_writer.RodataBlobSize(); return Api::Success(); +#endif } #endif // DART_PRECOMPILER @@ -6301,7 +6313,7 @@ DART_EXPORT Dart_Handle Dart_PrecompileJIT() { } -DART_EXPORT Dart_Handle Dart_CreatePrecompiledJITSnapshotBlob( +DART_EXPORT Dart_Handle Dart_CreateAppJITSnapshot( uint8_t** vm_isolate_snapshot_buffer, intptr_t* vm_isolate_snapshot_size, uint8_t** isolate_snapshot_buffer, @@ -6310,11 +6322,14 @@ DART_EXPORT Dart_Handle Dart_CreatePrecompiledJITSnapshotBlob( intptr_t* instructions_blob_size, uint8_t** rodata_blob_buffer, intptr_t* rodata_blob_size) { +#if defined(TARGET_ARCH_IA32) + return Api::NewError("Snapshots with code are not supported on IA32."); +#else API_TIMELINE_DURATION; DARTSCOPE(Thread::Current()); Isolate* I = T->isolate(); if (!FLAG_load_deferred_eagerly) { - return Dart_NewApiError( + return Api::NewError( "Creating full snapshots requires --load_deferred_eagerly"); } if (vm_isolate_snapshot_buffer == NULL) { @@ -6366,6 +6381,7 @@ DART_EXPORT Dart_Handle Dart_CreatePrecompiledJITSnapshotBlob( *rodata_blob_size = instructions_writer.RodataBlobSize(); return Api::Success(); +#endif } diff --git a/samples/samples.status b/samples/samples.status index 10734814834..1fa1d289ebe 100644 --- a/samples/samples.status +++ b/samples/samples.status @@ -28,5 +28,5 @@ sample_extension/test/sample_extension_test: Skip # Issue 14705 [ $arch == simarm64 ] *: Skip -[ $noopt || $runtime == dart_precompiled || $runtime == dart_product ] +[ $noopt || $runtime == dart_precompiled || $runtime == dart_app ] sample_extension: Skip # Platform.executable diff --git a/tests/benchmark_smoke/benchmark_smoke.status b/tests/benchmark_smoke/benchmark_smoke.status index 7aa0af0ebff..056911f7e9e 100644 --- a/tests/benchmark_smoke/benchmark_smoke.status +++ b/tests/benchmark_smoke/benchmark_smoke.status @@ -2,7 +2,7 @@ # 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. -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) ] *: Skip [ $compiler == dart2js && $runtime == none ] diff --git a/tests/co19/co19-runtime.status b/tests/co19/co19-runtime.status index fb4c02ec344..1ce94103c29 100644 --- a/tests/co19/co19-runtime.status +++ b/tests/co19/co19-runtime.status @@ -3,7 +3,7 @@ # BSD-style license that can be found in the LICENSE file. -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) ] # Failures ok in tests below. VM moves super initializer to end of list. Language/Classes/Constructors/Generative_Constructors/execution_t03: Fail, OK @@ -43,7 +43,7 @@ LibTest/isolate/Isolate/spawn_A02_t02: RuntimeError # Dart issue 15617 LibTest/core/Symbol/Symbol_A01_t03: RuntimeError # Issue 13596 LibTest/core/Symbol/Symbol_A01_t05: RuntimeError # Issue 13596 -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) ] LibTest/typed_data/Float32x4/reciprocalSqrt_A01_t01: Pass, Fail # co19 issue 599 LibTest/typed_data/Float32x4/reciprocal_A01_t01: Pass, Fail # co19 issue 599 Language/Expressions/Instance_Creation/Const/abstract_class_t01: MissingCompileTimeError # Issue 22007 @@ -53,10 +53,10 @@ Language/Libraries_and_Scripts/Imports/invalid_uri_t02: Fail Language/Libraries_and_Scripts/Exports/invalid_uri_t02: Fail Language/Libraries_and_Scripts/Parts/syntax_t06: Fail -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && $mode == debug ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) && $mode == debug ] LibTest/core/List/List_class_A01_t02: Pass, Slow -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && ($arch != x64 && $arch != simarm64 && $arch != arm64) ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) && ($arch != x64 && $arch != simarm64 && $arch != arm64) ] LibTest/core/int/operator_left_shift_A01_t02: Fail # co19 issue 129 [ ($compiler == none || $compiler == precompiler) && ($runtime == vm || $runtime == dart_precompiled) && ($arch == mips || $arch == arm64) ] @@ -66,7 +66,7 @@ LibTest/core/List/List_class_A01_t02: Skip # co19 issue 673 LibTest/collection/ListMixin/ListMixin_class_A01_t02: Skip # co19 issue 673 LibTest/collection/ListBase/ListBase_class_A01_t02: Skip # co19 issue 673 -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && ($arch == simarm || $arch == simarmv6 || $arch == simarmv5te || $arch == simmips || $arch == simarm64) ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) && ($arch == simarm || $arch == simarmv6 || $arch == simarmv5te || $arch == simmips || $arch == simarm64) ] LibTest/core/Uri/Uri_A06_t03: Skip # Timeout LibTest/collection/ListMixin/ListMixin_class_A01_t01: Skip # Timeout LibTest/collection/ListBase/ListBase_class_A01_t01: Skip # Timeout @@ -77,19 +77,19 @@ LibTest/collection/ListBase/ListBase_class_A01_t02: Skip # Timeout LibTest/collection/ListMixin/ListMixin_class_A01_t02: Pass, Slow LibTest/collection/ListBase/ListBase_class_A01_t02: Pass, Slow -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) ] LibTest/isolate/Isolate/spawn_A02_t01: Skip # co19 issue 667 LibTest/html/*: SkipByDesign # dart:html not supported on VM. LayoutTests/fast/*: SkipByDesign # DOM not supported on VM. WebPlatformTest/*: SkipByDesign # dart:html not supported on VM. -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && $mode == debug && $builder_tag == asan ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) && $mode == debug && $builder_tag == asan ] Language/Types/Interface_Types/subtype_t27: Skip # Issue 21174. -[ ($runtime == vm || $runtime == dart_product) && $arch == arm ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) && $arch == arm ] LibTest/typed_data/Float32x4/operator_multiplication_A01_t01: Fail # Dart issue 24416 -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) ] # co19 update Sep 29, 2015 (3ed795ea02e022ef19c77cf1b6095b7c8f5584d0) Language/Classes/Getters/type_object_t01: RuntimeError # Issue 23721 Language/Classes/Getters/type_object_t02: RuntimeError # Issue 23721 @@ -127,7 +127,7 @@ Language/Mixins/declaring_constructor_t01: MissingCompileTimeError # co19 issue Language/Mixins/not_object_superclass_t01: MissingCompileTimeError # co19 issue 43 and 44 Language/Mixins/reference_to_super_t01: MissingCompileTimeError # co19 issue 43 and 44 -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && $checked ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) && $checked ] Language/Errors_and_Warnings/static_warning_t01: RuntimeError # co19 issue 45 Language/Errors_and_Warnings/static_warning_t02: RuntimeError # co19 issue 45 Language/Errors_and_Warnings/static_warning_t03: RuntimeError # co19 issue 45 @@ -138,7 +138,7 @@ Language/Errors_and_Warnings/static_warning_t06: RuntimeError # co19 issue 45 [ $noopt || $compiler == precompiler || $mode == product ] Language/Metadata/*: SkipByDesign # Uses dart:mirrors -[ $runtime == dart_precompiled || $runtime == dart_product ] +[ $runtime == dart_precompiled || $runtime == dart_app ] LibTest/isolate/Isolate/spawnUri*: Skip # Isolate.spawnUri [ $noopt || $compiler == precompiler ] @@ -146,6 +146,8 @@ LibTest/collection/ListBase/ListBase_class_A01_t02: Pass, Timeout LibTest/collection/ListMixin/ListMixin_class_A01_t02: Pass, Timeout LibTest/core/Map/Map_class_A01_t04: Pass, Timeout LibTest/core/Uri/encodeQueryComponent_A01_t02: Pass, Timeout + +[ $noopt || $compiler == precompiler || $compiler == dart2appjit ] Language/Mixins/Mixin_Application/error_t01: Pass Language/Mixins/Mixin_Application/error_t02: Pass Language/Mixins/declaring_constructor_t01: Pass diff --git a/tests/corelib/corelib.status b/tests/corelib/corelib.status index 97578160993..60be0ba2bcc 100644 --- a/tests/corelib/corelib.status +++ b/tests/corelib/corelib.status @@ -14,7 +14,7 @@ string_from_environment2_test: Skip string_from_environment3_test: Skip string_from_environment_test: Skip -[ ($compiler == none || $compiler == precompiler || $compiler == dart2app) ] +[ ($compiler == none || $compiler == precompiler || $compiler == dart2app || $compiler == dart2appjit) ] unicode_test: Fail # Bug 6706 compare_to2_test: Fail # Bug 4018 @@ -30,7 +30,7 @@ symbol_operator_test/03: Fail # bug 11669 string_case_test/01: Fail # Bug 18061 # #void should be a valid symbol. -[ $compiler == none || $compiler == precompiler || $compiler == dart2app || $compiler == dart2js ] +[ $compiler == none || $compiler == precompiler || $compiler == dart2app || $compiler == dart2appjit || $compiler == dart2js ] symbol_reserved_word_test/02: CompileTimeError # bug 20191 symbol_reserved_word_test/05: CompileTimeError # bug 20191 @@ -57,7 +57,7 @@ integer_to_radix_string_test: RuntimeError # issue 22045 int_modulo_arith_test/bignum: RuntimeError # No bigints. int_modulo_arith_test/modPow: RuntimeError # No bigints. -[ ($compiler == none || $compiler == precompiler || $compiler == dart2app) && $runtime != dartium && $runtime != drt ] +[ ($compiler == none || $compiler == precompiler || $compiler == dart2app || $compiler == dart2appjit) && $runtime != dartium && $runtime != drt ] symbol_test/02: MissingCompileTimeError # bug 11669 symbol_test/03: MissingCompileTimeError # bug 11669 @@ -154,10 +154,10 @@ stopwatch_test: Skip # Flaky test due to expected performance behaviour. # The regexp tests are not verified to work on non d8/vm platforms yet. regexp/*: Skip -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) ] regexp/global_test: Skip # Timeout. Issue 21709 and 21708 -[ $runtime != vm && $runtime != dart_precompiled && $runtime != dart_product && $compiler != dart2analyzer] +[ $runtime != vm && $runtime != dart_precompiled && $runtime != dart_app && $compiler != dart2analyzer] data_resource_test: RuntimeError # Issue 23825 (not implemented yet). file_resource_test: Skip, OK # VM specific test, uses dart:io. http_resource_test: Skip, OK # VM specific test, uses dart:io. @@ -168,7 +168,7 @@ package_resource_test: RuntimeError # Issue 23825 (not implemented yet). [ $mode == debug ] regexp/pcre_test: Pass, Slow # Timeout. Issue 22008 -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && $arch == simarmv5te ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) && $arch == simarmv5te ] int_parse_radix_test/*: Pass, Slow big_integer_parsed_mul_div_vm_test: Pass, Slow @@ -201,7 +201,7 @@ big_integer_huge_mul_vm_test: Pass, Timeout # --no_intrinsify big_integer_parsed_mul_div_vm_test: Pass, Timeout # --no_intrinsify int_parse_radix_test: Pass, Timeout # --no_intrinsify -[ $compiler == precompiler || $runtime == dart_product ] +[ $compiler == precompiler || $runtime == dart_app ] data_resource_test: Skip # Resolve URI not supported yet in product mode. package_resource_test: Skip # Resolve URI not supported yet in product mode. file_resource_test: Skip # Resolve URI not supported yet in product mode. diff --git a/tests/html/html.status b/tests/html/html.status index dfd1a252ac1..d39e5b92938 100644 --- a/tests/html/html.status +++ b/tests/html/html.status @@ -364,7 +364,7 @@ websql_test/supported: Fail # 'html' tests import the HTML library, so they only make sense in # a browser environment. -[ $runtime == vm || $runtime == dart_precompiled || $runtime == dart_product ] +[ $runtime == vm || $runtime == dart_precompiled || $runtime == dart_app ] *: Skip [ $compiler == dart2js && ($runtime == drt || $runtime == ff) ] diff --git a/tests/isolate/isolate.status b/tests/isolate/isolate.status index 59748da2a62..d9976d38eb8 100644 --- a/tests/isolate/isolate.status +++ b/tests/isolate/isolate.status @@ -2,17 +2,17 @@ # 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. -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) ] browser/*: SkipByDesign # Browser specific tests isolate_stress_test: Skip # Issue 12588: Uses dart:html. This should be able to pass when we have wrapper-less tests. [ $runtime != vm || $mode == product ] checked_test: Skip # Unsupported. -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && $arch == mips && $mode == debug ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) && $arch == mips && $mode == debug ] mandel_isolate_test: Skip # Uses 600 MB Ram on our 1 GB test device. -[ ($compiler == none || $compiler == precompiler || $compiler == dart2app) ] +[ ($compiler == none || $compiler == precompiler || $compiler == dart2app || $compiler == dart2appjit) ] compile_time_error_test/01: Skip # Issue 12587 ping_test: Skip # Resolve test issues ping_pause_test: Skip # Resolve test issues @@ -157,27 +157,44 @@ request_reply_test: SkipByDesign spawn_function_custom_class_test: SkipByDesign spawn_function_test: SkipByDesign stacktrace_message_test: SkipByDesign -stacktrace_message_test: SkipByDesign static_function_test: SkipByDesign unresolved_ports_test: SkipByDesign -[ $runtime == dart_precompiled || $runtime == dart_product ] -deferred_in_isolate_test: Skip # Isolate.spawnUri +[ $runtime == dart_precompiled || $runtime == dart_app ] +count_test: Skip # Isolate.spawnUri +cross_isolate_message_test: Skip # Isolate.spawnUri deferred_in_isolate2_test: Skip # Isolate.spawnUri -exit_at_spawnuri_test: Skip # Isolate.spawnUri -error_exit_at_spawnuri_test: Skip # Isolate.spawnUri -issue_24243_parent_isolate_test: Skip # Isolate.spawnUri -issue_21398_parent_isolate1_test: Skip # Isolate.spawnUri -spawn_uri_exported_main_test: Skip # Isolate.spawnUri -spawn_uri_test: Skip # Isolate.spawnUri -spawn_uri_nested_vm_test: Skip # Isolate.spawnUri deferred_in_isolate_test: Skip # Isolate.spawnUri -spawn_uri_multi_test: Skip # Isolate.spawnUri -spawn_uri_vm_test: Skip # Isolate.spawnUri -issue_21398_parent_isolate_test: Skip # Isolate.spawnUri +deferred_in_isolate_test: Skip # Isolate.spawnUri error_at_spawnuri_test: Skip # Isolate.spawnUri +error_exit_at_spawnuri_test: Skip # Isolate.spawnUri +exit_at_spawnuri_test: Skip # Isolate.spawnUri +illegal_msg_function_test: Skip # Isolate.spawnUri +illegal_msg_mirror_test: Skip # Isolate.spawnUri +isolate_complex_messages_test: Skip # Isolate.spawnUri +issue_21398_parent_isolate1_test: Skip # Isolate.spawnUri +issue_21398_parent_isolate_test: Skip # Isolate.spawnUri +issue_24243_parent_isolate_test: Skip # Isolate.spawnUri +mandel_isolate_test: Skip # Isolate.spawnUri +message2_test: Skip # Isolate.spawnUri +message_test: Skip # Isolate.spawnUri +mint_maker_test: Skip # Isolate.spawnUri +nested_spawn2_test: Skip # Isolate.spawnUri +nested_spawn_test: Skip # Isolate.spawnUri +raw_port_test: Skip # Isolate.spawnUri +request_reply_test: Skip # Isolate.spawnUri +spawn_function_custom_class_test: Skip # Isolate.spawnUri +spawn_function_test: Skip # Isolate.spawnUri +spawn_uri_exported_main_test: Skip # Isolate.spawnUri spawn_uri_missing_from_isolate_test: Skip # Isolate.spawnUri spawn_uri_missing_test: Skip # Isolate.spawnUri +spawn_uri_multi_test: Skip # Isolate.spawnUri +spawn_uri_nested_vm_test: Skip # Isolate.spawnUri +spawn_uri_test: Skip # Isolate.spawnUri +spawn_uri_vm_test: Skip # Isolate.spawnUri +stacktrace_message_test: Skip # Isolate.spawnUri +static_function_test: Skip # Isolate.spawnUri +unresolved_ports_test: Skip # Isolate.spawnUri [ $mode == product ] issue_24243_parent_isolate_test: Skip # Requires checked mode diff --git a/tests/language/language.status b/tests/language/language.status index b64df8136b1..d744e274a4b 100644 --- a/tests/language/language.status +++ b/tests/language/language.status @@ -5,7 +5,7 @@ # This directory contains tests that are intended to show the # current state of the language. -[ ($compiler == none || $compiler == precompiler || $compiler == dart2app) ] +[ ($compiler == none || $compiler == precompiler || $compiler == dart2app || $compiler == dart2appjit) ] tearoff_constructor_basic_test: Skip # Crashes in checked mode -- hausner investigating # These tests are skipped in the VM because it has "--supermixin" @@ -53,17 +53,17 @@ generic_methods_new_test: CompiletimeError # Issue 25869 generic_methods_function_type_test: CompiletimeError # Issue 25869 generic_methods_type_expression_test: CompiletimeError # Issue 25869 -[ ($compiler == none || $compiler == precompiler || $compiler == dart2app) && ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) ] +[ ($compiler == none || $compiler == precompiler || $compiler == dart2app || $compiler == dart2appjit) && ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) ] class_keyword_test/02: MissingCompileTimeError # Issue 13627 unicode_bom_test: Fail # Issue 16067 vm/debug_break_enabled_vm_test/01: Crash, OK # Expected to hit breakpoint. try_catch_optimized1_test: Skip # Srdjan investigating -[ ($compiler == none || $compiler == precompiler || $compiler == dart2app) && $checked ] +[ ($compiler == none || $compiler == precompiler || $compiler == dart2app || $compiler == dart2appjit) && $checked ] type_variable_bounds4_test/01: Fail # Issue 14006 -[ ($compiler == none || $compiler == precompiler || $compiler == dart2app) && (($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) || $runtime == drt || $runtime == dartium) ] +[ ($compiler == none || $compiler == precompiler || $compiler == dart2app || $compiler == dart2appjit) && (($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) || $runtime == drt || $runtime == dartium) ] dynamic_prefix_core_test/none: Fail # Issue 12478 export_ambiguous_main_negative_test: Fail # Issue 14763 @@ -111,22 +111,22 @@ async_await_test: Skip # Issue 26198 [ $compiler == none && $runtime == drt ] disassemble_test: Pass, Fail # Issue 18122 -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && $arch == mips && $mode == debug ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) && $arch == mips && $mode == debug ] large_class_declaration_test: SkipSlow # Times out. Issue 20352 -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && $arch == arm64 ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) && $arch == arm64 ] large_class_declaration_test: SkipSlow # Uses too much memory. [ $compiler == none && ($runtime == dartium || $runtime == drt) && $mode == debug ] large_class_declaration_test: SkipSlow # Times out. Issue 20352 -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && ( $arch == simarm || $arch == arm || $arch == simarmv6 || $arch == armv6 || $arch == simarmv5te || $arch == armv5te || $arch == simarm64 || $arch == arm64 || $arch == simmips || $arch == mips) ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) && ( $arch == simarm || $arch == arm || $arch == simarmv6 || $arch == armv6 || $arch == simarmv5te || $arch == armv5te || $arch == simarm64 || $arch == arm64 || $arch == simmips || $arch == mips) ] vm/load_to_load_unaligned_forwarding_vm_test: Pass, Crash # Unaligned offset. Issue 22151 [ $compiler == none && ($runtime == dartium || $runtime == drt) ] issue23244_test: Fail # Issue 23244 -[ ($compiler == none || $compiler == precompiler || $compiler == dart2app) && (($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) || $runtime == drt || $runtime == dartium) && $arch == ia32 ] +[ ($compiler == none || $compiler == precompiler || $compiler == dart2app || $compiler == dart2appjit) && (($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) || $runtime == drt || $runtime == dartium) && $arch == ia32 ] vm/regress_24517_test: Pass, Fail # Issue 24517. [ $noopt || $compiler == precompiler ] @@ -162,7 +162,7 @@ super_call4_test: SkipByDesign super_getter_setter_test: SkipByDesign vm/reflect_core_vm_test: SkipByDesign -[ $noopt || $compiler == precompiler || $compiler == dart2app || $mode == product ] +[ $noopt || $compiler == precompiler || $compiler == dart2app || $compiler == dart2appjit || $mode == product ] # Deferred loading happens eagerly regress_23408_test: Skip deferred_inheritance_constraints_test: Skip @@ -173,7 +173,7 @@ deferred_static_seperate_test: Skip deferred_constraints_type_annotation_test/new_before_load: Skip regress_22443_test: Skip -[ $compiler == precompiler || $compiler == dart2app ] +[ $compiler == precompiler || $compiler == dart2app || $compiler == dart2appjit ] ct_const2_test: Skip # Incompatible flag: --compile_all hello_dart_test: Skip # Incompatible flag: --compile_all @@ -181,7 +181,7 @@ hello_dart_test: Skip # Incompatible flag: --compile_all implicit_closure_test: Skip # Incompatible flag: --use_slow_path deopt_inlined_function_lazy_test: Skip # Incompatible flag: --deoptimize-alot -[ $noopt || $compiler == precompiler || $compiler == dart2app ] +[ $noopt || $compiler == precompiler || $compiler == dart2app || $compiler == dart2appjit ] vm/type_vm_test: RuntimeError # Expects line and column numbers vm/type_cast_vm_test: RuntimeError # Expects line and column numbers @@ -201,17 +201,17 @@ map_literal4_test: SkipByDesign # Requires checked mode. vm/type_vm_test: Fail,OK # Expects exact type name. -[ ($compiler == none || $compiler == precompiler || $compiler == dart2app) && $browser ] +[ ($compiler == none || $compiler == precompiler || $compiler == dart2app || $compiler == dart2appjit) && $browser ] # The following tests are supposed to fail. library_env_test/has_io_support: RuntimeError, OK library_env_test/has_no_html_support: RuntimeError, OK -[ ($compiler == none || $compiler == precompiler || $compiler == dart2app) && $browser != true ] +[ ($compiler == none || $compiler == precompiler || $compiler == dart2app || $compiler == dart2appjit) && $browser != true ] # The following tests are supposed to fail. library_env_test/has_html_support: RuntimeError, OK library_env_test/has_no_io_support: RuntimeError, OK -[ ($compiler == none || $compiler == dart2app) && $noopt == false && $mode != product ] +[ ($compiler == none || $compiler == dart2app || $compiler == dart2appjit) && $noopt == false && $mode != product ] # The following tests are supposed to fail. library_env_test/has_no_mirror_support: RuntimeError, OK diff --git a/tests/lib/lib.status b/tests/lib/lib.status index d6abe8f20f8..07ac39bf788 100644 --- a/tests/lib/lib.status +++ b/tests/lib/lib.status @@ -186,12 +186,12 @@ async/timer_not_available_test: Fail, OK # only meant to test when there is no w # 'js' tests import the dart:js library, so they only make sense in # a browser environment. -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) ] js/*: Skip # 'js' tests import the dart:js library, so they only make sense in # a browser environment. -[ $runtime == dart_product ] +[ $runtime == dart_app ] js/*: SkipByDesign mirrors/*: SkipByDesign @@ -229,12 +229,12 @@ async/multiple_timer_test: Pass, Fail # Probably issue 14734 # TODO(efortuna): Investigate. async/timer_test: Fail, Pass -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) ] async/timer_not_available_test: Fail, OK mirrors/native_class_test: Fail, OK # This test is meant to run in a browser. mirrors/deferred_type_test: CompileTimeError, OK # Don't have a multitest marker for dynamic compile time errors. -[ $compiler == none || $compiler == precompiler || $compiler == dart2app ] +[ $compiler == none || $compiler == precompiler || $compiler == dart2app || $compiler == dart2appjit ] async/timer_not_available_test: SkipByDesign # only meant to test when there is no way to implement timer (currently only in d8) mirrors/symbol_validation_test: RuntimeError # Issue 13596 @@ -300,7 +300,7 @@ mirrors/*deferred*: Pass,RuntimeError # Issue 17458 [ $compiler == dart2js && $mode == debug ] mirrors/native_class_test: Pass, Slow -[ ($compiler == none || $compiler == precompiler || $compiler == dart2app) && $arch == mips ] +[ ($compiler == none || $compiler == precompiler || $compiler == dart2app || $compiler == dart2appjit) && $arch == mips ] async/timer_regress22626_test: Pass, RuntimeError # Issue 22626 [ $arch == simarm || $arch == simarmv6 || $arch == simarmv5te ] @@ -323,13 +323,13 @@ convert/utf85_test: Skip # Pass, Slow Issue 20111. [ $mode == debug && $arch == ia32 && $system == windows ] convert/streamed_conversion_json_utf8_decode_test: Skip # Verification OOM. -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && $mode == debug && $arch == x64 && $system == windows ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) && $mode == debug && $arch == x64 && $system == windows ] convert/streamed_conversion_json_utf8_decode_test: Pass, Slow [ $mode == debug && $arch != ia32 && $arch != x64 && $arch != simarm && $arch != simarmv6 && $arch != simarmv5te ] convert/streamed_conversion_json_utf8_decode_test: Skip # Verification not yet implemented. -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && $mode == debug && $builder_tag == asan ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) && $mode == debug && $builder_tag == asan ] mirrors/immutable_collections_test: SkipSlow # Timeout. convert/streamed_conversion_json_utf8_decode_test: Skip # Timeout. diff --git a/tests/standalone/standalone.status b/tests/standalone/standalone.status index 975dad79162..4ab080cb340 100644 --- a/tests/standalone/standalone.status +++ b/tests/standalone/standalone.status @@ -18,15 +18,15 @@ verified_mem_test: Pass, Slow, Timeout # Does verify before and after GC. issue14236_test: Pass # Do not remove this line. It serves as a marker for Issue 14516 comment #4. -[ ($runtime != vm && $runtime != dart_precompiled && $runtime != dart_product) && ($runtime != drt || $compiler != none)) ] +[ ($runtime != vm && $runtime != dart_precompiled && $runtime != dart_app) && ($runtime != drt || $compiler != none)) ] no_assert_test: Fail, OK # This is testing a vm flag. -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) ] package/package_isolate_test: Fail # Issue 12474 io/observatory_test: Fail package/scenarios/invalid/same_package_twice_test: Pass # Issue 24119 -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && $checked ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) && $checked ] # These tests have type errors on purpose. io/process_invalid_arguments_test: Fail, OK io/directory_invalid_arguments_test: Fail, OK @@ -39,7 +39,7 @@ io/stdout_bad_argument_test: Fail, OK io/file_fuzz_test: Skip io/directory_fuzz_test: Skip -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && $system == macos ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) && $system == macos ] # 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). @@ -112,7 +112,7 @@ regress_25335_test: Skip # Int64List not supported. [ $compiler == dart2js && $cps_ir && $checked ] *: Skip # `assert` not implemented -[ ($runtime == vm || $runtime == dart_product) && ($arch == arm || $arch == arm64) ] +[ ($runtime == vm || $runtime == dart_app) && ($arch == arm || $arch == arm64) ] io/file_stream_test: Skip # Issue 26109 io/file_typed_data_test: Skip # Issue 26109 io/file_input_stream_test: Skip # Issue 26109 @@ -186,13 +186,13 @@ io/sleep_test: Pass, Fail # Issue 25757 [ $arch != ia32 && $arch != x64 && $arch != simarm && $arch != simarmv5te && $mode == debug ] verified_mem_test: Skip # Not yet implemented. -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && $mode == debug && $builder_tag == asan ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) && $mode == debug && $builder_tag == asan ] full_coverage_test: Skip # Timeout. io/file_lock_test: Skip # Timeout. io/test_runner_test: Skip # Timeout. io/http_client_stays_alive_test: Skip # Timeout. -[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) ] +[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) ] # Failures in secure networking while NSS is replaced with BoringSSL io/https_client_certificate_test: RuntimeError # Issue 24070 io/secure_socket_renegotiate_test: RuntimeError @@ -209,6 +209,8 @@ assert_test: Pass, RuntimeError [ $noopt || $compiler == precompiler ] map_insert_remove_oom_test: Skip # Heap limit too low. Increasing iteration count to make a higher limit a meaningful test makes it too slow for simarm[64] bots. io/web_socket_test: Pass, RuntimeError # Issue 24674 + +[ $noopt || $compiler == precompiler || $compiler == dart2appjit ] io/test_extension_test: Skip # Platform.executable io/test_extension_fail_test: Skip # Platform.executable io/platform_test: Skip # Platform.executable @@ -216,13 +218,13 @@ io/code_collection_test: Skip # Platform.executable full_coverage_test: Skip # Platform.executable regress_26031_test: Skip # Platform.resolvedExecutable -[ $compiler == precompiler || $compiler == dart2app ] +[ $compiler == precompiler || $compiler == dart2app || $compiler == dart2appjit ] io/compile_all_test: Skip # Incompatible flag --compile_all -[ $runtime == dart_product ] +[ $runtime == dart_app ] io/stdout_bad_argument_test: Skip # Test exits and so can't generate snapshot. -[ $runtime == dart_precompiled || $runtime == dart_product ] +[ $runtime == dart_precompiled || $runtime == dart_app ] full_coverage_test: Skip # Platform.executable http_launch_test: Skip # Platform.executable io/addlatexhash_test: Skip # Platform.executable @@ -258,7 +260,7 @@ io/named_pipe_script_test: Skip # Platform.executable io/regress_7679_test: Skip # Platform.executable io/process_*: Skip # Most use Platform.executable -[ $runtime == dart_precompiled || $runtime == dart_product || $mode == product ] +[ $runtime == dart_precompiled || $runtime == dart_app || $mode == product ] debugger/*: Skip assert_test: SkipByDesign # Requires checked mode. no_assert_test: SkipByDesign # Requires checked mode. @@ -278,8 +280,8 @@ no_support_il_printer_test: SkipByDesign no_support_service_test: SkipByDesign no_support_timeline_test: SkipByDesign -# Following tests are skipped on dart_product as package mapping is not supported. -[ $runtime == dart_precompiled || $runtime == dart_product ] +# Following tests are skipped on dart_app as package mapping is not supported. +[ $runtime == dart_precompiled || $runtime == dart_app ] package/scenarios/packages_file_strange_formatting/mixed_line_ends_test: Skip package/scenarios/packages_file_strange_formatting/empty_lines_test: Skip package/scenarios/invalid/invalid_utf8_test: Skip diff --git a/tools/precompilation/test_linux.sh b/tools/precompilation/test_linux.sh deleted file mode 100755 index 056fde00122..00000000000 --- a/tools/precompilation/test_linux.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -set -ex - -# Usage: -# cd sdk -# ./tools/precompilation/test_linux.sh - -./tools/build.py -mdebug -ax64 runtime - -./out/DebugX64/dart_bootstrap --gen-precompiled-snapshot --package-root=out/DebugX64/packages/ "$1" - -gcc -nostartfiles -m64 -shared -Wl,-soname,libprecompiled.so -o libprecompiled.so precompiled.S - -gdb -ex run --args ./out/DebugX64/dart_precompiled_runtime --run-precompiled-snapshot=$PWD not_used.dart diff --git a/tools/precompilation/test_linux_simarm.sh b/tools/precompilation/test_linux_simarm.sh deleted file mode 100755 index 13d09eb34ec..00000000000 --- a/tools/precompilation/test_linux_simarm.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -set -ex - -# Usage: -# cd sdk -# ./tools/precompilation/test_linux.sh - -./tools/build.py -mdebug -asimarm runtime - -./out/DebugSIMARM/dart_bootstrap --gen-precompiled-snapshot --package-root=out/DebugX64/packages/ "$1" - -gcc -nostartfiles -m32 -shared -Wl,-soname,libprecompiled.so -o libprecompiled.so precompiled.S - -gdb -ex run --args ./out/DebugSIMARM/dart_precompiled_runtime --run-precompiled-snapshot=$PWD not_used.dart diff --git a/tools/precompilation/test_macos.sh b/tools/precompilation/test_macos.sh deleted file mode 100755 index 1b97e36680c..00000000000 --- a/tools/precompilation/test_macos.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -set -ex - -# Usage: -# cd sdk -# ./tools/precompilation/test_macos.sh - -./tools/build.py -mdebug -ax64 runtime - -./xcodebuild/DebugX64/dart_bootstrap --gen-precompiled-snapshot --package-root=xcodebuild/DebugX64/packages/ "$1" - -clang -nostartfiles -m64 -dynamiclib -o libprecompiled.dylib precompiled.S - -lldb -- ./xcodebuild/DebugX64/dart_precompiled_runtime --run-precompiled-snapshot=$PWD not_used.dart diff --git a/tools/testing/dart/compiler_configuration.dart b/tools/testing/dart/compiler_configuration.dart index 5781e837cd6..398986a50f1 100644 --- a/tools/testing/dart/compiler_configuration.dart +++ b/tools/testing/dart/compiler_configuration.dart @@ -74,6 +74,9 @@ abstract class CompilerConfiguration { case 'dart2app': return new Dart2AppSnapshotCompilerConfiguration( isDebug: isDebug, isChecked: isChecked); + case 'dart2appjit': + return new Dart2AppJitSnapshotCompilerConfiguration( + isDebug: isDebug, isChecked: isChecked, useBlobs: useBlobs); case 'precompiler': return new PrecompilerCompilerConfiguration( isDebug: isDebug, @@ -552,6 +555,37 @@ class Dart2AppSnapshotCompilerConfiguration extends CompilerConfiguration { } } +class Dart2AppJitSnapshotCompilerConfiguration extends Dart2AppSnapshotCompilerConfiguration { + final bool useBlobs; + Dart2AppJitSnapshotCompilerConfiguration({bool isDebug, bool isChecked, bool useBlobs}) + : super(isDebug: isDebug, isChecked: isChecked), this.useBlobs = useBlobs; + + CompilationCommand computeCompilationCommand( + String tempDir, + String buildDir, + CommandBuilder commandBuilder, + List arguments, + Map environmentOverrides) { + var exec = "$buildDir/dart"; + var args = new List(); + args.add("--snapshot=$tempDir"); + args.add("--snapshot-kind=app-jit-after-run"); + if (useBlobs) { + args.add("--use-blobs"); + } + args.addAll(arguments); + + return commandBuilder.getCompilationCommand( + 'dart2snapshot', + tempDir, + !useSdk, + bootstrapDependencies(buildDir), + exec, + args, + environmentOverrides); + } +} + class AnalyzerCompilerConfiguration extends CompilerConfiguration { AnalyzerCompilerConfiguration( {bool isDebug, bool isChecked, bool isHostChecked, bool useSdk}) diff --git a/tools/testing/dart/runtime_configuration.dart b/tools/testing/dart/runtime_configuration.dart index 822700f59d5..8c10e10ea21 100644 --- a/tools/testing/dart/runtime_configuration.dart +++ b/tools/testing/dart/runtime_configuration.dart @@ -50,8 +50,8 @@ class RuntimeConfiguration { case 'vm': return new StandaloneDartRuntimeConfiguration(); - case 'dart_product': - return new DartProductRuntimeConfiguration(); + case 'dart_app': + return new DartAppRuntimeConfiguration(useBlobs: useBlobs); case 'dart_precompiled': if (configuration['system'] == 'android') { @@ -224,7 +224,10 @@ class StandaloneDartRuntimeConfiguration extends DartVmRuntimeConfiguration { } } -class DartProductRuntimeConfiguration extends DartVmRuntimeConfiguration { +class DartAppRuntimeConfiguration extends DartVmRuntimeConfiguration { + final bool useBlobs; + DartAppRuntimeConfiguration({bool useBlobs}) : useBlobs = useBlobs; + List computeRuntimeCommands( TestSuite suite, CommandBuilder commandBuilder, @@ -234,11 +237,14 @@ class DartProductRuntimeConfiguration extends DartVmRuntimeConfiguration { String script = artifact.filename; String type = artifact.mimeType; if (script != null && type != 'application/dart-snapshot') { - throw "dart_product cannot run files of type '$type'."; + throw "dart_app cannot run files of type '$type'."; } var augmentedArgs = new List(); augmentedArgs.add("--run-app-snapshot=${artifact.filename}"); + if (useBlobs) { + augmentedArgs.add("--use-blobs"); + } augmentedArgs.addAll(arguments); return [ diff --git a/tools/testing/dart/test_options.dart b/tools/testing/dart/test_options.dart index dfca7798212..c5c6e343dac 100644 --- a/tools/testing/dart/test_options.dart +++ b/tools/testing/dart/test_options.dart @@ -73,9 +73,9 @@ class TestOptionsParser { (only valid with the following runtimes: none) dart2app: Compile the Dart code into an app snapshot before running the test - (only valid with the following runtimes: dart_product)''', + (only valid with the following runtimes: dart_app)''', ['-c', '--compiler'], - ['none', 'precompiler', 'dart2js', 'dart2analyzer', 'dart2app'], + ['none', 'precompiler', 'dart2js', 'dart2analyzer', 'dart2app', 'dart2appjit'], 'none'), // TODO(antonm): fix the option drt. new _TestOptionSpecification( @@ -86,7 +86,7 @@ class TestOptionsParser { dart_precompiled: Run a precompiled snapshot on a variant of the standalone dart vm lacking a JIT. - dart_product: Run a full app snapshot in product mode. + dart_app: Run a full app snapshot, with or without cached unoptimized code. d8: Run JavaScript from the command line using v8. @@ -111,7 +111,7 @@ class TestOptionsParser { [ 'vm', 'dart_precompiled', - 'dart_product', + 'dart_app', 'd8', 'jsshell', 'drt', @@ -645,7 +645,10 @@ Note: currently only implemented for dart2js.''', validRuntimes = const ['none']; break; case 'dart2app': - validRuntimes = const ['dart_product']; + validRuntimes = const ['dart_app']; + break; + case 'dart2appjit': + validRuntimes = const ['dart_app']; break; case 'precompiler': validRuntimes = const ['dart_precompiled']; diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart index ca8b8c84d3d..8bc8e9a165c 100644 --- a/tools/testing/dart/test_suite.dart +++ b/tools/testing/dart/test_suite.dart @@ -1763,11 +1763,11 @@ class StandardTestSuite extends TestSuite { } List> getVmOptions(Map optionsFromFile) { - var COMPILERS = const ['none', 'precompiler', 'dart2app']; + var COMPILERS = const ['none', 'precompiler', 'dart2app', 'dart2appjit']; var RUNTIMES = const [ 'none', 'dart_precompiled', - 'dart_product', + 'dart_app', 'vm', 'drt', 'dartium', @@ -2183,7 +2183,9 @@ class TestUtils { } static deleteTempSnapshotDirectory(Map configuration) { - if (configuration['compiler'] == 'dart2app') { + if (configuration['compiler'] == 'dart2app' || + configuration['compiler'] == 'dart2appjit' || + configuration['compiler'] == 'precompiler') { var checked = configuration['checked'] ? '-checked' : ''; var minified = configuration['minified'] ? '-minified' : ''; var csp = configuration['csp'] ? '-csp' : '';