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

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

Issue 11412097: Move hashCode and runtimeType into new interceptors 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_number.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/lib/js_number.dart (revision 15142)
+++ sdk/lib/_internal/compiler/implementation/lib/js_number.dart (working copy)
@@ -117,6 +117,8 @@
return JS('String', r'String(#)', this);
}
}
+
+ int get hashCode => this & 0x1FFFFFFF;
}
class JSInt extends JSNumber {
@@ -125,8 +127,11 @@
bool get isEven => (this & 1) == 0;
bool get isOdd => (this & 1) == 1;
+
+ Type get runtimeType => createRuntimeType('int');
}
class JSDouble extends JSNumber {
const JSDouble();
+ Type get runtimeType => createRuntimeType('double');
}

Powered by Google App Engine
This is Rietveld 408576698