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

Unified Diff: lib/compiler/implementation/lib/core_patch.dart

Issue 10913271: Move parseInt parseDouble to int/double classes as a static method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Make int.parse directly native. Created 8 years, 3 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/compiler/implementation/lib/core.dart ('k') | lib/compiler/implementation/lib/coreimpl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/lib/core_patch.dart
diff --git a/lib/compiler/implementation/lib/core_patch.dart b/lib/compiler/implementation/lib/core_patch.dart
index 9d374415812fa5186686f1a06696c320f382030c..bc881b3391220ec29540977276584feb97808576 100644
--- a/lib/compiler/implementation/lib/core_patch.dart
+++ b/lib/compiler/implementation/lib/core_patch.dart
@@ -57,3 +57,11 @@ patch class Expando<T> {
static const String _EXPANDO_PROPERTY_NAME = 'expando\$values';
static int _keyCount = 0;
}
+
+patch class int {
+ patch static int parse(String string) => Primitives.parseInt(string);
+}
+
+patch class double {
+ patch static double parse(String string) => Primitives.parseDouble(string);
+}
« no previous file with comments | « lib/compiler/implementation/lib/core.dart ('k') | lib/compiler/implementation/lib/coreimpl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698