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

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

Issue 11861007: Move indexSet and unary operators to the new interceptor mechanism. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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/compiler/implementation/lib/js_number.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/lib/js_number.dart (revision 17016)
+++ sdk/lib/_internal/compiler/implementation/lib/js_number.dart (working copy)
@@ -142,6 +142,8 @@
}
int get hashCode => this & 0x1FFFFFFF;
+
+ num operator -() => JS('num', r'-#', this);
}
class JSInt extends JSNumber {
@@ -152,6 +154,8 @@
bool get isOdd => (this & 1) == 1;
Type get runtimeType => int;
+
+ int operator ~() => JS('num', r'(~#) >>> 0', this);
}
class JSDouble extends JSNumber {

Powered by Google App Engine
This is Rietveld 408576698