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

Unified Diff: lib/compiler/implementation/lib/math.dartp

Issue 10697084: Recognize "patch" identifier in .dartp files. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
Index: lib/compiler/implementation/lib/math.dartp
diff --git a/lib/compiler/implementation/lib/math.dartp b/lib/compiler/implementation/lib/math.dartp
index 2901563f4f5857f7beaff73530f1d104dbcbec79..af061bff0c7e2bee778958b74b8a8715f8d2213d 100644
--- a/lib/compiler/implementation/lib/math.dartp
+++ b/lib/compiler/implementation/lib/math.dartp
@@ -4,9 +4,10 @@
// Patch file for dart:math library.
-// Imports the MathNatives class used by the library.
+// Imports the MathNatives class used by the library as well as checkNum used
+// below.
#import("js_helper.dart");
// Override the sqrt function, as proof-of-concept.
-double sqrt(num value)
+patch double sqrt(num value)
=> JS('double', @'Math.sqrt(#)', checkNum(value));

Powered by Google App Engine
This is Rietveld 408576698