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

Unified Diff: runtime/lib/integers_patch.dart

Issue 1105453003: Remove public int.is64Bit. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 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 | « runtime/lib/growable_array.cc ('k') | runtime/lib/internal_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/integers_patch.dart
===================================================================
--- runtime/lib/integers_patch.dart (revision 45400)
+++ runtime/lib/integers_patch.dart (working copy)
@@ -5,13 +5,14 @@
// VM implementation of int.
+import 'dart:_internal' as internal;
+
patch class int {
/* patch */ const factory int.fromEnvironment(String name,
{int defaultValue})
native "Integer_fromEnvironment";
- static bool is64Bit() => 1 << 32 is _Smi;
static int _tryParseSmi(String str, int first, int last) {
assert(first <= last);
@@ -26,7 +27,7 @@
return null; // Empty.
}
}
- var smiLimit = is64Bit() ? 18 : 9;
+ var smiLimit = internal.is64Bit ? 18 : 9;
if ((last - ix) >= smiLimit) {
return null; // May not fit into a Smi.
}
@@ -112,7 +113,7 @@
static int _parseRadix(String source, int radix,
int start, int end, int sign) {
- int tableIndex = (radix - 2) * 4 + (int.is64Bit() ? 2 : 0);
+ int tableIndex = (radix - 2) * 4 + (internal.is64Bit ? 2 : 0);
int blockSize = _PARSE_LIMITS[tableIndex];
int length = end - start;
if (length <= blockSize) {
« no previous file with comments | « runtime/lib/growable_array.cc ('k') | runtime/lib/internal_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698