Revert "[VM] Enable --limit-ints-to-64-bits in Dart 2.0 precompiler, v2."
This reverts commit 2a3f00a179.
Reason for revert: SIMARM bots are timing out.
Original change's description:
> [VM] Enable --limit-ints-to-64-bits in Dart 2.0 precompiler, v2.
>
> * Enable --limit-ints-to-64-bits for CFE when it is used to generate
> kernel for VM as CFE relies on int.parse being able to parse correct
> literals and reject incorrect.
>
> * Pass --limit-ints-to-64-bits to gen_kernel via environment
> variable to support batch mode compilation.
>
> * Use current Dart SDK instead of checked-in Dart SDK to run CFE
> in gen_kernel as checked-in Dart SDK is old and it doesn't have
> int.parse fix yet.
>
> Issue: https://github.com/dart-lang/sdk/issues/31339
> Change-Id: Iaba2a7945a3faa9427f9aab1e9f2b907fa2246a3
> Reviewed-on: https://dart-review.googlesource.com/29941
> Commit-Queue: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
TBR=vegorov@google.com,kustermann@google.com,alexmarkov@google.com,zra@google.com,asiva@google.com
Change-Id: Iecf26953bc6ae95c3bf0d1142bb89fb51cb0aaee
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Issue: https://github.com/dart-lang/sdk/issues/31339
Reviewed-on: https://dart-review.googlesource.com/30440
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
dbbc005042
commit
0dc324a68d
@@ -36,5 +36,4 @@ BIN_DIR="$OUT_DIR$DART_CONFIGURATION"
|
||||
exec "$BIN_DIR"/dart_precompiled_runtime \
|
||||
--strong \
|
||||
--reify-generic-functions \
|
||||
--limit-ints-to-64-bits \
|
||||
"$@"
|
||||
|
||||
+5
-37
@@ -8,13 +8,6 @@
|
||||
|
||||
set -e
|
||||
|
||||
# Enable Dart 2.0 fixed-size integers for gen_kernel if running in strong mode.
|
||||
for arg in "$@"; do
|
||||
if [ "$arg" == "--strong-mode" ]; then
|
||||
DART_VM_FLAGS="--limit-ints-to-64-bits $DART_VM_FLAGS"
|
||||
fi
|
||||
done
|
||||
|
||||
function follow_links() {
|
||||
file="$1"
|
||||
while [ -h "$file" ]; do
|
||||
@@ -32,39 +25,14 @@ CUR_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)"
|
||||
|
||||
SDK_DIR="$CUR_DIR/../../.."
|
||||
|
||||
# TODO(kustermann): For windows as well as for hosts running on arm, our
|
||||
# checked-in dart binaries must be adjusted.
|
||||
if [[ `uname` == 'Darwin' ]]; then
|
||||
DART="$SDK_DIR/tools/sdks/mac/dart-sdk/bin/dart"
|
||||
OUT_DIR="$SDK_DIR/xcodebuild"
|
||||
else
|
||||
DART="$SDK_DIR/tools/sdks/linux/dart-sdk/bin/dart"
|
||||
OUT_DIR="$SDK_DIR/out"
|
||||
fi
|
||||
|
||||
if [ -z $DART_VM_FLAGS ]; then
|
||||
# No custom Dart VM flags, so use checked-in stable Dart SDK.
|
||||
|
||||
# TODO(kustermann): For windows as well as for hosts running on arm, our
|
||||
# checked-in dart binaries must be adjusted.
|
||||
if [[ `uname` == 'Darwin' ]]; then
|
||||
DART="$SDK_DIR/tools/sdks/mac/dart-sdk/bin/dart"
|
||||
else
|
||||
DART="$SDK_DIR/tools/sdks/linux/dart-sdk/bin/dart"
|
||||
fi
|
||||
|
||||
else
|
||||
# Use current Dart SDK to run Fasta as checked-in SDK might not fully
|
||||
# support --limit-ints-to-64-bits.
|
||||
#
|
||||
# TODO(alexmarkov): Use checked-in SDK once it is updated and includes
|
||||
# fix required by Fasta.
|
||||
|
||||
export DART_CONFIGURATION=${DART_CONFIGURATION:-ReleaseX64}
|
||||
export DART_USE_SDK=${DART_USE_SDK:0}
|
||||
BUILD_DIR="$OUT_DIR/$DART_CONFIGURATION"
|
||||
|
||||
if [[ $DART_USE_SDK -eq 1 ]]; then
|
||||
DART="$BUILD_DIR"/dart-sdk/bin/dart
|
||||
else
|
||||
DART="$BUILD_DIR"/dart
|
||||
fi
|
||||
fi
|
||||
|
||||
exec "$DART" $DART_VM_FLAGS "${SDK_DIR}/pkg/vm/bin/gen_kernel.dart" $@
|
||||
exec "$DART" "${SDK_DIR}/pkg/vm/bin/gen_kernel.dart" $@
|
||||
|
||||
@@ -67,9 +67,7 @@ export DART_CONFIGURATION=${DART_CONFIGURATION:-ReleaseX64}
|
||||
BIN_DIR="$OUT_DIR/$DART_CONFIGURATION"
|
||||
|
||||
# Step 1: Generate Kernel binary from the input Dart source.
|
||||
"$BIN_DIR"/dart \
|
||||
--limit-ints-to-64-bits \
|
||||
"${SDK_DIR}/pkg/vm/bin/gen_kernel.dart" \
|
||||
"$BIN_DIR"/dart "${SDK_DIR}/pkg/vm/bin/gen_kernel.dart" \
|
||||
--platform "${BIN_DIR}/vm_platform_strong.dill" \
|
||||
--aot \
|
||||
$PACKAGES \
|
||||
@@ -80,7 +78,6 @@ BIN_DIR="$OUT_DIR/$DART_CONFIGURATION"
|
||||
exec "$BIN_DIR"/dart_bootstrap \
|
||||
--strong \
|
||||
--reify-generic-functions \
|
||||
--limit-ints-to-64-bits \
|
||||
--snapshot-kind=app-aot \
|
||||
--use-blobs \
|
||||
--snapshot="$SNAPSHOT_FILE" \
|
||||
|
||||
@@ -67,6 +67,9 @@ cc/IsolateReload_KernelIncrementalCompileGenerics: Skip
|
||||
cc/Mixin_PrivateSuperResolution: Skip
|
||||
cc/Mixin_PrivateSuperResolutionCrossLibraryShouldFail: Skip
|
||||
|
||||
[ $compiler == dartkp ]
|
||||
dart/truncating_ints_test: CompileTimeError # Issue 31339
|
||||
|
||||
[ $compiler == precompiler ]
|
||||
dart/byte_array_test: Skip # Incompatible flag --disable_alloc_stubs_after_gc
|
||||
|
||||
@@ -355,9 +358,6 @@ dart/snapshot_version_test: RuntimeError # Please triage.
|
||||
dart/spawn_infinite_loop_test: Crash # Please triage.
|
||||
dart/truncating_ints_test: CompileTimeError # Please triage.
|
||||
|
||||
[ $compiler == dartkp && !$strong ]
|
||||
dart/truncating_ints_test: Skip # This test cannot be run in dartkp/legacy mode (gen_kernel does not pass --limit-ints-to-64-bits in legacy mode).
|
||||
|
||||
[ $compiler == dartkp && ($runtime == dart_precompiled || $runtime == vm) ]
|
||||
dart/data_uri_import_test/base64: CompileTimeError
|
||||
dart/data_uri_import_test/nocharset: CompileTimeError
|
||||
|
||||
@@ -63,6 +63,13 @@ symbol_test/01: MissingCompileTimeError
|
||||
symbol_test/02: MissingCompileTimeError
|
||||
symbol_test/03: MissingCompileTimeError
|
||||
|
||||
[ $compiler == dartkp ]
|
||||
bit_twiddling_test/int64: CompileTimeError # Issue 31339
|
||||
integer_to_radix_string_test/01: CompileTimeError # Issue 31339
|
||||
integer_to_radix_string_test/02: CompileTimeError # Issue 31339
|
||||
integer_to_string_test/01: CompileTimeError # Issue 31339
|
||||
num_sign_test: CompileTimeError, Crash # Issue 31339
|
||||
|
||||
[ $compiler == precompiler ]
|
||||
int_parse_radix_test: Pass, Timeout # --no_intrinsify
|
||||
integer_parsed_mul_div_vm_test: Pass, Timeout # --no_intrinsify
|
||||
@@ -443,6 +450,20 @@ symbol_test/03: MissingCompileTimeError
|
||||
symbol_test/none: RuntimeError
|
||||
unicode_test: RuntimeError
|
||||
|
||||
# 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) ]
|
||||
bit_twiddling_test/int64: CompileTimeError # Please triage.
|
||||
integer_to_radix_string_test/02: CompileTimeError # Please triage.
|
||||
integer_to_string_test/01: CompileTimeError # Please triage.
|
||||
num_sign_test: CompileTimeError # Please triage.
|
||||
|
||||
[ $compiler == dartkp && $mode == debug && $runtime == dart_precompiled && $strong ]
|
||||
bit_twiddling_test/int64: CompileTimeError
|
||||
integer_parsed_arith_vm_test/01: RuntimeError
|
||||
integer_parsed_arith_vm_test/02: RuntimeError
|
||||
|
||||
# ===== dartkp + dart_precompiled status lines =====
|
||||
[ $compiler == dartkp && $runtime == dart_precompiled && $strong ]
|
||||
bool_from_environment2_test/03: MissingCompileTimeError
|
||||
@@ -657,7 +678,7 @@ regexp/pcre_test: Pass, Slow, Timeout
|
||||
|
||||
[ $runtime == dart_precompiled || $runtime == vm ]
|
||||
integer_parsed_arith_vm_test/01: RuntimeError # Issue 31346
|
||||
integer_parsed_arith_vm_test/02: RuntimeError # Issue 31346
|
||||
integer_parsed_arith_vm_test/02: RuntimeError # Issue 31369
|
||||
integer_parsed_div_rem_vm_test/01: RuntimeError # Issue 31346
|
||||
integer_to_radix_string_test/01: RuntimeError # Issue 31346
|
||||
string_split_test: RuntimeError # does not return List<String>
|
||||
|
||||
@@ -65,9 +65,9 @@ testAddSub() {
|
||||
one, // 64 bit overflow. //# 01: continued
|
||||
"-0x8000000000000000"); // //# 01: continued
|
||||
addSubParsed( // //# 02: ok
|
||||
minus_one, // //# 02: continued
|
||||
"0xFFFFFFFFFFFFFFFF", // //# 02: continued
|
||||
one, // 64 bit overflow. //# 02: continued
|
||||
zero); // //# 02: continued
|
||||
"0"); // //# 02: continued
|
||||
addSubParsed(
|
||||
"0x8000000", // 28 bit overflow.
|
||||
"0x8000000",
|
||||
@@ -81,9 +81,9 @@ testAddSub() {
|
||||
"0x80000000000000",
|
||||
"0x100000000000000");
|
||||
addSubParsed( // //# 02: continued
|
||||
"-0x8000000000000000", // 64 bit overflow. //# 02: continued
|
||||
"-0x8000000000000000", // //# 02: continued
|
||||
zero); // //# 02: continued
|
||||
"0x8000000000000000", // 64 bit overflow. //# 02: continued
|
||||
"0x8000000000000000", // //# 02: continued
|
||||
"0"); // //# 02: continued
|
||||
|
||||
addSubParsed("-0x123", minus_one, "-0x124");
|
||||
addSubParsed(minus_one, "-0x123", "-0x124");
|
||||
|
||||
@@ -12,9 +12,14 @@
|
||||
# ===== Skip dartk and darkp in !$strong mode ====
|
||||
|
||||
[ $compiler == dartkp ]
|
||||
bit_operations_test: CompileTimeError # Issue 31339
|
||||
generic_no_such_method_dispatcher_test: RuntimeError # Issue 31424
|
||||
identical_closure2_test: CompileTimeError # Issue 31339
|
||||
mint_arithmetic_test: CompileTimeError # Issue 31339
|
||||
mock_writable_final_field_test: RuntimeError # Issue 31424
|
||||
no_such_method_subtype_test: RuntimeError # Issue 31424
|
||||
vm/unaligned_integer_access_literal_index_test: CompileTimeError # Issue 31339
|
||||
vm/unaligned_integer_access_register_index_test: CompileTimeError # Issue 31339
|
||||
|
||||
[ $compiler == dartk && $mode == debug && $runtime == vm && $strong ]
|
||||
bad_named_parameters_test/01: Crash # Issue(http://dartbug.com/31630)
|
||||
@@ -1195,6 +1200,9 @@ wrong_number_type_arguments_test/none: Pass
|
||||
# are to be triaged. Isolate tests are skipped on purpose due to the usage of
|
||||
# batch mode.
|
||||
[ $compiler == dartk && $strong && ($arch == simarm || $arch == simarm64) ]
|
||||
bit_operations_test/03: CompileTimeError # Please triage.
|
||||
bit_operations_test/04: CompileTimeError # Please triage.
|
||||
bit_operations_test/none: CompileTimeError # Please triage.
|
||||
class_cycle_test/02: MissingCompileTimeError # Please triage.
|
||||
class_cycle_test/03: MissingCompileTimeError # Please triage.
|
||||
duplicate_implements_test/01: MissingCompileTimeError # Please triage.
|
||||
@@ -1202,11 +1210,15 @@ duplicate_implements_test/02: MissingCompileTimeError # Please triage.
|
||||
duplicate_implements_test/03: MissingCompileTimeError # Please triage.
|
||||
duplicate_implements_test/04: MissingCompileTimeError # Please triage.
|
||||
generic_methods_generic_function_result_test/01: MissingCompileTimeError # Please triage.
|
||||
identical_closure2_test: CompileTimeError # Please triage.
|
||||
issue23244_test: RuntimeError # Please triage.
|
||||
least_upper_bound_expansive_test/none: RuntimeError # Please triage.
|
||||
mint_arithmetic_test: CompileTimeError # Please triage.
|
||||
mixin_black_listed_test/02: MissingCompileTimeError # Please triage.
|
||||
null_test/02: MissingCompileTimeError # Please triage.
|
||||
null_test/03: MissingCompileTimeError # Please triage.
|
||||
vm/unaligned_integer_access_literal_index_test: CompileTimeError # Please triage.
|
||||
vm/unaligned_integer_access_register_index_test: CompileTimeError # Please triage.
|
||||
|
||||
[ $compiler == dartk && !$strong ]
|
||||
*: SkipByDesign # language_2 is only supported in strong mode.
|
||||
@@ -1963,6 +1975,8 @@ instanceof4_test/none: RuntimeError
|
||||
instantiate_tearoff_after_contravariance_check_test: CompileTimeError
|
||||
instantiate_tearoff_of_call_test: CompileTimeError
|
||||
instantiate_tearoff_test: CompileTimeError
|
||||
int64_literal_test/03: MissingCompileTimeError # http://dartbug.com/31479
|
||||
int64_literal_test/30: MissingCompileTimeError # http://dartbug.com/31479
|
||||
interface_test/00: MissingCompileTimeError
|
||||
invocation_mirror2_test: SkipByDesign
|
||||
invocation_mirror_invoke_on2_test: SkipByDesign
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
# missing a section you need, please reach out to sigmund@ to see the best way
|
||||
# to add them.
|
||||
|
||||
[ $compiler == dartkp ]
|
||||
typed_data/int32x4_arithmetic_test/int64: CompileTimeError # Issue 31339
|
||||
|
||||
[ $arch == x64 && $compiler == dartk && $mode == debug && $runtime == vm && $strong ]
|
||||
mirrors/invocation_fuzz_test: Skip # Because it times out, issue 29439.
|
||||
mirrors/variable_is_const_test/01: Crash
|
||||
@@ -385,6 +388,7 @@ mirrors/invocation_fuzz_test/none: CompileTimeError # Please triage.
|
||||
mirrors/invocation_fuzz_test/smi: CompileTimeError # Please triage.
|
||||
mirrors/invocation_fuzz_test/string: CompileTimeError # Please triage.
|
||||
mirrors/spawn_function_root_library_test: Skip
|
||||
typed_data/int32x4_arithmetic_test/int64: CompileTimeError # Please triage.
|
||||
|
||||
# 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
|
||||
|
||||
@@ -38,7 +38,7 @@ main() {
|
||||
Expect.equals(2305843009213693952, shiftLeft1(61));
|
||||
// Deoptimize on 64 bits.
|
||||
Expect.equals(4611686018427387904, shiftLeft1(62));
|
||||
Expect.equals(-9223372036854775808, shiftLeft1(63));
|
||||
Expect.equals(9223372036854775808, shiftLeft1(63));
|
||||
|
||||
Expect.equals(8448, shiftLeft8448(0));
|
||||
Expect.equals(1081344, shiftLeft8448(7));
|
||||
|
||||
@@ -115,7 +115,7 @@ void testUint64ToSmi() {
|
||||
intArray[0] = 4611686018427387903; // SmiMax
|
||||
intArray[1] = -1; // 0xFFFFFFFFFFFFFFFF : 18446744073709551615
|
||||
intArray[2] = 4611686018427387904; // SmiMax+1
|
||||
intArray[3] = -9223372036854775808;
|
||||
intArray[3] = 9223372036854775808;
|
||||
var x = intArray[0];
|
||||
var y = intArray[1];
|
||||
var z = intArray[2];
|
||||
@@ -123,7 +123,7 @@ void testUint64ToSmi() {
|
||||
Expect.equals(4611686018427387903, x);
|
||||
Expect.equals(-1, y);
|
||||
Expect.equals(4611686018427387904, z);
|
||||
Expect.equals(-9223372036854775808, w);
|
||||
Expect.equals(9223372036854775808, w);
|
||||
}
|
||||
|
||||
main() {
|
||||
|
||||
@@ -28,7 +28,7 @@ class MediumIntegerTest {
|
||||
Expect.equals(1234567890123456791, a + b);
|
||||
Expect.equals(1234567890123456791, b + a);
|
||||
a = 9223372036854775807;
|
||||
Expect.equals(-9223372036854775808, a + 1);
|
||||
Expect.equals(9223372036854775808, a + 1);
|
||||
|
||||
// Mint and Mint.
|
||||
a = 100000000000000001;
|
||||
|
||||
@@ -10,6 +10,11 @@
|
||||
# missing a section you need, please reach out to sigmund@ to see the best way
|
||||
# to add them.
|
||||
|
||||
[ $compiler == dartkp ]
|
||||
bytedata_test: CompileTimeError # Issue 31339
|
||||
typed_array_int64_uint64_test: CompileTimeError, Crash # Issue 31339
|
||||
typed_data_view_test: CompileTimeError # Issue 31339
|
||||
|
||||
[ $compiler == dartk && $mode == debug && $runtime == vm && $strong ]
|
||||
io/file_lock_test: Slow, Pass
|
||||
io/raw_socket_test: Crash
|
||||
@@ -64,6 +69,7 @@ regress_29350_test/none: Pass # Issue 31537
|
||||
# are to be triaged. Isolate tests are skipped on purpose due to the usage of
|
||||
# batch mode.
|
||||
[ $compiler == dartk && $strong && ($arch == simarm || $arch == simarm64) ]
|
||||
bytedata_test: CompileTimeError # Please triage.
|
||||
map_insert_remove_oom_test: Pass # Please triage.
|
||||
package/scenarios/invalid/invalid_utf8_test: Pass # Please triage.
|
||||
package/scenarios/invalid/non_existent_packages_file_test: Pass # Please triage.
|
||||
@@ -73,8 +79,10 @@ package/scenarios/packages_option_only/packages_option_only_test: CompileTimeErr
|
||||
regress_26031_test: RuntimeError # Please triage.
|
||||
regress_28854_1_test: RuntimeError # Please triage.
|
||||
regress_28854_2_test: RuntimeError # Please triage.
|
||||
typed_array_int64_uint64_test: CompileTimeError # Please triage.
|
||||
typed_array_test: RuntimeError # Please triage.
|
||||
typed_data_isolate_test: RuntimeError # Please triage.
|
||||
typed_data_view_test: CompileTimeError # Please triage.
|
||||
|
||||
# ===== Skip dartk and darkp in !$strong mode ====
|
||||
[ $compiler == dartk && !$strong ]
|
||||
|
||||
@@ -1052,13 +1052,6 @@ abstract class VMKernelCompilerMixin {
|
||||
];
|
||||
args.add(arguments.where((name) => name.endsWith('.dart')).single);
|
||||
|
||||
if (_isStrong) {
|
||||
// Pass environment variable to the gen_kernel script as
|
||||
// arguments are not passed if gen_kernel runs in batch mode.
|
||||
environmentOverrides = new Map.from(environmentOverrides);
|
||||
environmentOverrides['DART_VM_FLAGS'] = '--limit-ints-to-64-bits';
|
||||
}
|
||||
|
||||
return Command.vmKernelCompilation(dillFile, true, bootstrapDependencies(),
|
||||
genKernel, args, environmentOverrides);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user