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

Issue 2983633002: Avoid Bigint literals in Dart core library (Closed)

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

Description

Avoid Bigint literals in Dart core library This CL is a step towards preparation of Dart core library for 64-bit integers in Dart. In the new --limit-ints-to-64-bits mode integer literals which are out of range will be rejected, so such literals should not be used in the core library. R=zra@google.com Issue: https://github.com/dart-lang/sdk/issues/30103 Committed: https://github.com/dart-lang/sdk/commit/a2388dd37005b35946699e635474583ebf4bfb1d

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -3 lines) Patch
M runtime/lib/bigint.dart View 2 chunks +6 lines, -1 line 2 comments Download
M runtime/lib/typed_data_patch.dart View 1 chunk +4 lines, -2 lines 2 comments Download

Messages

Total messages: 7 (2 generated)
alexmarkov
3 years, 5 months ago (2017-07-14 22:12:41 UTC) #2
zra
lgtm
3 years, 5 months ago (2017-07-14 22:26:24 UTC) #3
alexmarkov
Committed patchset #1 (id:1) manually as a2388dd37005b35946699e635474583ebf4bfb1d (presubmit successful).
3 years, 5 months ago (2017-07-17 15:05:05 UTC) #5
regis
DBC https://codereview.chromium.org/2983633002/diff/1/runtime/lib/bigint.dart File runtime/lib/bigint.dart (right): https://codereview.chromium.org/2983633002/diff/1/runtime/lib/bigint.dart#newcode62 runtime/lib/bigint.dart:62: static const int _TWO_DIGITS_MASK = (1 << _TWO_DIGITS_BITS) ...
3 years, 5 months ago (2017-07-17 16:45:32 UTC) #6
alexmarkov
3 years, 5 months ago (2017-07-17 20:21:29 UTC) #7
Message was sent while issue was closed.
Followed up in a separate CL:
https://codereview.chromium.org/2980243002/

https://codereview.chromium.org/2983633002/diff/1/runtime/lib/bigint.dart
File runtime/lib/bigint.dart (right):

https://codereview.chromium.org/2983633002/diff/1/runtime/lib/bigint.dart#new...
runtime/lib/bigint.dart:62: static const int _TWO_DIGITS_MASK = (1 <<
_TWO_DIGITS_BITS) - 1;
On 2017/07/17 16:45:31, regis wrote:
> How is this supposed to work? Do you avoid the creation of a bigint when
bigints
> are disabled, because the shift will wrap around? A comment explaining these
new
> constants would be nice.

Done.

https://codereview.chromium.org/2983633002/diff/1/runtime/lib/typed_data_patc...
File runtime/lib/typed_data_patch.dart (right):

https://codereview.chromium.org/2983633002/diff/1/runtime/lib/typed_data_patc...
runtime/lib/typed_data_patch.dart:3047: const _uint64Mask = (1 << 64) - 1;
On 2017/07/17 16:45:31, regis wrote:
> ditto

Done.

Powered by Google App Engine
This is Rietveld 408576698