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

Unified Diff: sdk/lib/_internal/compiler/implementation/lib/js_string.dart

Issue 11348129: Add JSNumber, JSInt and JSDouble for the new interceptor scheme. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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/compiler/implementation/lib/js_string.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/lib/js_string.dart (revision 15078)
+++ sdk/lib/_internal/compiler/implementation/lib/js_string.dart (working copy)
@@ -123,5 +123,11 @@
return stringContainsUnchecked(this, other, startIndex);
}
- bool get isEmpty => length == 0;
+ bool get isEmpty => length == 0;
+
+ int compareTo(String other) {
+ if (other is !String) throw new ArgumentError(other);
+ return this == other ? 0
+ : JS('bool', r'# < #', this, other) ? -1 : 1;
+ }
}

Powered by Google App Engine
This is Rietveld 408576698