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

Unified Diff: lib/json/json.dart

Issue 10829459: Deprecate Math object in corelib in favor of dart:math library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 8 years, 4 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 | « lib/crypto/hash_utils.dart ('k') | lib/uri/encode_decode.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/json/json.dart
diff --git a/lib/json/json.dart b/lib/json/json.dart
index a2fc308e34ba7b53517cbe023d9543b1893646ec..5238c15b8a56ee99ef04d0ea09cf8be20c7cbb0a 100644
--- a/lib/json/json.dart
+++ b/lib/json/json.dart
@@ -1,9 +1,11 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#library("dart:json");
+#import('dart:math');
+
// Pure Dart implementation of JSON protocol.
/**
@@ -289,7 +291,7 @@ class _JsonParser {
}
final codeString = json.substring(position + 1, position + 5);
try {
- c = Math.parseInt('0x${codeString}');
+ c = parseInt('0x${codeString}');
} catch (var e) {
_error('Invalid unicode esacape sequence');
}
@@ -347,9 +349,9 @@ class _JsonParser {
String number = json.substring(startPos, position);
if (isInt) {
- return Math.parseInt(number);
+ return parseInt(number);
} else {
- return Math.parseDouble(number);
+ return parseDouble(number);
}
}
« no previous file with comments | « lib/crypto/hash_utils.dart ('k') | lib/uri/encode_decode.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698