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

Unified Diff: sdk/lib/internal/internal.dart

Issue 649113005: Make JSON parsing work as a chunked conversion sink. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Also add an UTF-8 base JSON parser, without intermediate string representations. Created 6 years, 2 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
Index: sdk/lib/internal/internal.dart
diff --git a/sdk/lib/internal/internal.dart b/sdk/lib/internal/internal.dart
index 2d41870b65737e51e49b4e57263fb88f74b097c4..10b961312a021eacd49e1f84b2f652af6eb02821 100644
--- a/sdk/lib/internal/internal.dart
+++ b/sdk/lib/internal/internal.dart
@@ -16,3 +16,32 @@ part 'lists.dart';
part 'print.dart';
part 'sort.dart';
part 'symbol.dart';
+
+// Powers of 10 up to 10^22 are representable as doubles.
+// Powers of 10 above that are only approximate due to lack of precission.
+// Used by double-parsing.
+const POWERS_OF_TEN = const [
+ 1.0, /* 0 */
+ 10.0,
+ 100.0,
+ 1000.0,
+ 10000.0,
+ 100000.0, /* 5 */
+ 1000000.0,
+ 10000000.0,
+ 100000000.0,
+ 1000000000.0,
+ 10000000000.0, /* 10 */
+ 100000000000.0,
+ 1000000000000.0,
+ 10000000000000.0,
+ 100000000000000.0,
+ 1000000000000000.0, /* 15 */
+ 10000000000000000.0,
+ 100000000000000000.0,
+ 1000000000000000000.0,
+ 10000000000000000000.0,
+ 100000000000000000000.0, /* 20 */
+ 1000000000000000000000.0,
+ 10000000000000000000000.0,
+];

Powered by Google App Engine
This is Rietveld 408576698