Remove all uses of --limit-ints-to-64-bits VM option

VM option --limit-ints-to-64-bits was enabled by default a while ago,
and now we're preparing to remove it from Dart VM.

This CL removes all uses of this option in preparation for this cleanup.

Issue: https://github.com/dart-lang/sdk/issues/33306
Change-Id: I8f33cf4ca8ce7ef9a171a982346e43dd8cb722a9
Reviewed-on: https://dart-review.googlesource.com/57960
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
Alexander Markov 2018-06-01 19:32:24 +00:00 committed by commit-bot@chromium.org
parent 5db95fbb61
commit c8860b4ca2
16 changed files with 16 additions and 45 deletions

View file

@ -43,5 +43,4 @@ exec "$DART_BINARY" \
--preview_dart_2 \
--strong \
--reify-generic-functions \
--limit-ints-to-64-bits \
"$@"

View file

@ -35,4 +35,4 @@ if "%DART_USE_SDK%"=="1" (
)
set KERNEL_SERVICE_SNAPSHOT=%BUILD_DIR%/gen/kernel-service.dart.snapshot
"%DART_BINARY%" --preview_dart_2 --strong --reify-generic-functions --limit-ints-to-64-bits %*
"%DART_BINARY%" --preview_dart_2 --strong --reify-generic-functions %*

View file

@ -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 \
"$@"

View file

@ -8,9 +8,6 @@
set -e
# Enable Dart 2.0 fixed-size integers for gen_kernel
DART_VM_FLAGS="--limit-ints-to-64-bits $DART_VM_FLAGS"
function follow_links() {
file="$1"
while [ -h "$file" ]; do

View file

@ -13,9 +13,6 @@ if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1%
set SDK_DIR=%SCRIPTPATH%/../../../
REM Enable Dart 2.0 fixed-size integers for gen_kernel
set DART_VM_OPTIONS=--limit-ints-to-64-bits %DART_VM_OPTIONS%
set DART=%SDK_DIR%/tools/sdks/win/dart-sdk/bin/dart.exe
"%DART%" %DART_VM_OPTIONS% "%SDK_DIR%/pkg/vm/bin/gen_kernel.dart" %*

View file

@ -95,7 +95,6 @@ ENTRY_POINTS="--entry-points ${BIN_DIR}/gen/runtime/bin/precompiler_entry_points
# 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" \
--platform "${BIN_DIR}/vm_platform_strong.dill" \
--aot \
@ -109,7 +108,6 @@ ENTRY_POINTS="--entry-points ${BIN_DIR}/gen/runtime/bin/precompiler_entry_points
"$BIN_DIR"/dart_bootstrap \
--strong \
--reify-generic-functions \
--limit-ints-to-64-bits \
--snapshot-kind=app-aot \
--snapshot="$DART_BOOTSTRAP_OUT" \
"${OPTIONS[@]}" \

View file

@ -70,7 +70,6 @@ void Options::SetPreviewDart2Options(CommandLineOptions* vm_options) {
OPTION_FIELD(preview_dart_2) = true;
vm_options->AddArgument("--strong");
vm_options->AddArgument("--reify-generic-functions");
vm_options->AddArgument("--limit-ints-to-64-bits");
vm_options->AddArgument("--sync-async");
}

View file

@ -2,9 +2,9 @@
// 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.
// VMOptions=--limit-ints-to-64-bits --enable-inlining-annotations --optimization_counter_threshold=10 --no-use-osr --no-background-compilation
// VMOptions=--enable-inlining-annotations --optimization_counter_threshold=10 --no-use-osr --no-background-compilation
// Test for truncating (wrap-around) integer arithmetic in --limit-ints-to-64-bits mode.
// Test for truncating (wrap-around) integer arithmetic.
import "package:expect/expect.dart";

View file

@ -51,7 +51,7 @@ dart/optimized_stacktrace_line_test: RuntimeError # The source positions do not
dart/redirection_type_shuffling_test: Skip # Depends on lazy enforcement of type bounds
dart/simd128float32_array_test: Skip # compilers not aware of Simd128
dart/simd128float32_test: Skip # compilers not aware of Simd128
dart/truncating_ints_test: Skip # dart2js doesn't know about --limit-ints-to-64-bits
dart/truncating_ints_test: SkipByDesign # The test requires int64.
dart/wrap_around_in_range_analysis_test: SkipByDesign # The test requires int64.
[ $compiler == dartk ]
@ -238,9 +238,6 @@ 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
[ $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/utf16: MissingRuntimeError # UTF-16 data URIs work in dartk
dart/issue32950_test: SkipByDesign # uses spawnUri.

View file

@ -394,13 +394,13 @@ double_round_test/int64: RuntimeError, OK # Requires fixed-size int64 support.
double_truncate_test/int64: RuntimeError, OK # Requires fixed-size int64 support.
hash_set_test/01: RuntimeError # non JS number semantics - Issue 11551
int_modulo_arith_test/modPow: RuntimeError # Issue 29921
int_parse_with_limited_ints_test: Skip # dart2js and dartdevc don't know about --limit-ints-to-64-bits
int_parse_with_limited_ints_test: Skip # Requires fixed-size int64 support.
integer_arith_vm_test/modPow: RuntimeError # Issues 10245, 30170
integer_parsed_arith_vm_test: RuntimeError # Issues 10245, 29921
integer_parsed_div_rem_vm_test: RuntimeError # Issue 29921
integer_parsed_mul_div_vm_test: RuntimeError # Issue 29921
regress_r21715_test: RuntimeError # Requires fixed-size int64 support.
typed_data_with_limited_ints_test: Skip # dart2js and dartdevc don't know about --limit-ints-to-64-bits
typed_data_with_limited_ints_test: Skip # Requires fixed-size int64 support.
[ $runtime != none && ($compiler == dartdevc || $compiler == dartdevk) ]
bigint_test: Pass, Slow
@ -411,7 +411,7 @@ hash_set_test/01: RuntimeError # Issue 29921
int_modulo_arith_test/none: RuntimeError # Issue 29921
int_parse_radix_test/01: RuntimeError # Issue 29921
int_parse_radix_test/02: RuntimeError # Issue 29921
int_parse_with_limited_ints_test: Skip # dartdevc doesn't know about --limit-ints-to-64-bits
int_parse_with_limited_ints_test: Skip # Requires fixed-size int64 support.
integer_arith_vm_test/modPow: RuntimeError # Issue 30170
integer_parsed_arith_vm_test: RuntimeError # Issue 29921
integer_to_radix_string_test: RuntimeError # Issue 29921
@ -467,7 +467,7 @@ symbol_reserved_word_test/06: RuntimeError # Issue 29921
symbol_reserved_word_test/09: RuntimeError # Issue 29921
symbol_reserved_word_test/12: RuntimeError # Issue 29921
symbol_test/none: RuntimeError # Issue 29921
typed_data_with_limited_ints_test: Skip # dartdevc doesn't know about --limit-ints-to-64-bits
typed_data_with_limited_ints_test: Skip # Requires fixed-size int64 support.
[ $runtime == vm && !$strong ]
collection_of_test: RuntimeError

View file

@ -1,10 +1,8 @@
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// VMOptions=--limit-ints-to-64-bits
// Test for int.parse in --limit-ints-to-64-bits mode (with limited 64-bit
// integers).
// Test for int.parse with limited 64-bit integers.
import "package:expect/expect.dart";

View file

@ -1,10 +1,10 @@
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// VMOptions=--limit-ints-to-64-bits --optimization_counter_threshold=10 --no-background-compilation
// VMOptions=--optimization_counter_threshold=10 --no-background-compilation
// Test for dart:typed_data (in particular, ByteData.get/setUint64 and
// UInt64List) in --limit-ints-to-64-bits mode (with limited 64-bit integers).
// UInt64List) with limited 64-bit integers.
import 'dart:typed_data';
import "package:expect/expect.dart";

View file

@ -5,7 +5,7 @@
import "package:expect/expect.dart";
// Note: in --limit-ints-to-64-bits mode all integers are 64-bit already.
// Note: in Dart 2 mode all integers are 64-bit already.
// Still, it is harmless to apply _uint64Mask because (1 << 64) is 0 (all bits
// are shifted out), so _uint64Mask is -1 (its bit pattern is 0xffffffffffffffff).
const _uint64Mask = (1 << 64) - 1;

View file

@ -5,16 +5,11 @@
import "package:expect/expect.dart";
// Note: in --limit-ints-to-64-bits mode all integers are 64-bit already.
// Still, it is harmless to apply _uint64Mask because (1 << 64) is 0 (all bits
// are shifted out), so _uint64Mask is -1 (its bit pattern is 0xffffffffffffffff).
const _uint64Mask = (1 << 64) - 1;
constants() {
Expect.equals(0, 499 >> 33);
Expect.equals(0, (499 << 33) & 0xFFFFFFFF);
Expect.equals(0, (499 << 32) >> 65);
Expect.equals(0, ((499 << 32) << 65) & _uint64Mask);
Expect.equals(0, (499 << 32) << 65);
}
foo(i) {
@ -38,7 +33,7 @@ interceptors() {
Expect.equals(0, id(499) >> 33);
Expect.equals(0, (id(499) << 33) & 0xFFFFFFFF);
Expect.equals(0, id(499 << 32) >> 65);
Expect.equals(0, (id(499 << 32) << 65) & _uint64Mask);
Expect.equals(0, id(499 << 32) << 65);
}
speculative() {
@ -48,7 +43,7 @@ speculative() {
Expect.equals(0, a >> 33);
Expect.equals(0, (a << 33) & 0xFFFFFFFF);
Expect.equals(0, b >> 65);
Expect.equals(0, (b << 65) & _uint64Mask);
Expect.equals(0, b << 65);
}
}

View file

@ -1132,11 +1132,6 @@ abstract class VMKernelCompilerMixin {
args.add('--enable_asserts');
}
// 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);
}

View file

@ -862,12 +862,9 @@ class StandardTestSuite extends TestSuite {
// TODO(rnystrom): Hack. When running the 2.0 tests, always implicitly
// turn on reified generics in the VM.
// Note that VMOptions=--no-reify-generic-functions in test is ignored.
// Also, enable Dart 2.0 fixed-size integers with --limit-ints-to-64-bits.
// Dart 2 VM wrapper (pkg/vm/tool/dart2) already passes correct arguments.
if (suiteName.endsWith("_2") && !configuration.usingDart2VMWrapper) {
allVmOptions = allVmOptions.toList()
..add("--reify-generic-functions")
..add("--limit-ints-to-64-bits");
allVmOptions = allVmOptions.toList()..add("--reify-generic-functions");
}
var commands =