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

Unified Diff: runtime/lib/bigint.dart

Issue 2980243002: Add comments for constants which replaced large integer literals (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/lib/typed_data_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/bigint.dart
diff --git a/runtime/lib/bigint.dart b/runtime/lib/bigint.dart
index 217b6ed027913af46acc604126dda38121701ef3..dd5794f3aaf7c5a49bda821697a5cf6be636c2e7 100644
--- a/runtime/lib/bigint.dart
+++ b/runtime/lib/bigint.dart
@@ -57,7 +57,11 @@ class _Bigint extends _IntegerImplementation implements int {
static const int _DIGIT2_BITS = _DIGIT_BITS >> 1;
static const int _DIGIT2_MASK = (1 << _DIGIT2_BITS) - 1;
- // Bits per 2 digits
+ // Bits per 2 digits. Used to perform modulo 2^64 arithmetic.
+ // Note: in --limit-ints-to-64-bits mode most arithmetic operations are
+ // already modulo 2^64. Still, it is harmless to apply _TWO_DIGITS_MASK:
+ // (1 << _TWO_DIGITS_BITS) is 0 (all bits are shifted out), so
+ // _TWO_DIGITS_MASK is -1 (its bit pattern is 0xffffffffffffffff).
static const int _TWO_DIGITS_BITS = _DIGIT_BITS << 1;
static const int _TWO_DIGITS_MASK = (1 << _TWO_DIGITS_BITS) - 1;
« no previous file with comments | « no previous file | runtime/lib/typed_data_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698