Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Issue 2982823002: Option to truncate integers to 64 bits, part 2 (Closed)

Created:
3 years, 5 months ago by alexmarkov
Modified:
3 years, 5 months ago
Reviewers:
zra, regis, siva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Option to truncate integers to 64 bits, part 2 In --limit-ints-to-64-bits mode: * Integer constructors return Integer::null if integer is out of range. * Error is reported for integer literals which are out of range. * Dart API is revised to return errors if integers are out of range. Bigint::IsDisabled() method is introduced to be able to enable/disable Bigints independently of --limit-ints-to-64-bits mode in future. Deprecated constructor Integer::NewFromUint64 is replaced with Integer::New in certain cases. R=zra@google.com Issue: https://github.com/dart-lang/sdk/issues/30103 Committed: https://github.com/dart-lang/sdk/commit/abed3c2a70856d54615890596a4a5db6cffe124f

Patch Set 1 #

Patch Set 2 : Reverting a few test changes for now #

Total comments: 12

Patch Set 3 : Fixes for review comments #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+193 lines, -92 lines) Patch
M runtime/lib/integers.cc View 3 chunks +3 lines, -5 lines 1 comment Download
M runtime/lib/isolate.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M runtime/vm/bigint_test.cc View 8 chunks +32 lines, -0 lines 0 comments Download
M runtime/vm/dart_api_impl.cc View 1 2 6 chunks +16 lines, -2 lines 0 comments Download
M runtime/vm/dart_api_impl_test.cc View 1 5 chunks +63 lines, -34 lines 0 comments Download
M runtime/vm/object.h View 2 chunks +4 lines, -0 lines 0 comments Download
M runtime/vm/object.cc View 1 2 14 chunks +37 lines, -29 lines 0 comments Download
M runtime/vm/object_test.cc View 5 chunks +27 lines, -17 lines 0 comments Download
M runtime/vm/regexp_assembler_ir.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/snapshot_test.cc View 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
alexmarkov
3 years, 5 months ago (2017-07-14 14:54:52 UTC) #2
zra
https://codereview.chromium.org/2982823002/diff/20001/runtime/vm/dart_api_impl.cc File runtime/vm/dart_api_impl.cc (right): https://codereview.chromium.org/2982823002/diff/20001/runtime/vm/dart_api_impl.cc#newcode3102 runtime/vm/dart_api_impl.cc:3102: // TODO(alexmarkov): Figure out if Uint64 should be rejected ...
3 years, 5 months ago (2017-07-14 17:36:31 UTC) #3
alexmarkov
https://codereview.chromium.org/2982823002/diff/20001/runtime/vm/dart_api_impl.cc File runtime/vm/dart_api_impl.cc (right): https://codereview.chromium.org/2982823002/diff/20001/runtime/vm/dart_api_impl.cc#newcode3102 runtime/vm/dart_api_impl.cc:3102: // TODO(alexmarkov): Figure out if Uint64 should be rejected ...
3 years, 5 months ago (2017-07-14 18:23:46 UTC) #4
zra
lgtm
3 years, 5 months ago (2017-07-14 20:20:17 UTC) #5
alexmarkov
Committed patchset #3 (id:40001) manually as abed3c2a70856d54615890596a4a5db6cffe124f (presubmit successful).
3 years, 5 months ago (2017-07-14 20:24:59 UTC) #7
siva
https://codereview.chromium.org/2982823002/diff/40001/runtime/lib/integers.cc File runtime/lib/integers.cc (right): https://codereview.chromium.org/2982823002/diff/40001/runtime/lib/integers.cc#newcode33 runtime/lib/integers.cc:33: } When --limit-ints-to-64-bits mode is specified i.IsBigint() should always ...
3 years, 5 months ago (2017-07-14 20:53:29 UTC) #8
zra
3 years, 5 months ago (2017-07-14 21:04:18 UTC) #9
Message was sent while issue was closed.
On 2017/07/14 20:53:29, siva wrote:
> https://codereview.chromium.org/2982823002/diff/40001/runtime/lib/integers.cc
> File runtime/lib/integers.cc (right):
> 
>
https://codereview.chromium.org/2982823002/diff/40001/runtime/lib/integers.cc...
> runtime/lib/integers.cc:33: }
> When --limit-ints-to-64-bits mode is specified i.IsBigint() should always be
> false right.
> 
> I am wondering if we will be eliminating some code from the VM if we used
> if (!FLAG_limit_ints_to_64_bits) {
> } else {
>   ....
> }
> when the flag becomes a const with a value of true.
> 
> In other words I am asking if there is a plan in future CLs to completely
remove
> the BigInt stuff from the executable when the flag FLAG_limit_ints_to_64_bits
is
> specified.

A way to completely remove BigInt stuff probably isn't needed since we'll need
to have it around when BigInts are part of the public API separate from 'int'

Powered by Google App Engine
This is Rietveld 408576698