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

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

Issue 10892005: Revert "Support unary - operator." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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: dart/lib/compiler/implementation/lib/interceptors.dart
diff --git a/dart/lib/compiler/implementation/lib/interceptors.dart b/dart/lib/compiler/implementation/lib/interceptors.dart
index 8ca99f3a3151afe080eb7ec529b72c4cebdb34b0..a851330645a26aecccdccaa146f20270aef02221 100644
--- a/dart/lib/compiler/implementation/lib/interceptors.dart
+++ b/dart/lib/compiler/implementation/lib/interceptors.dart
@@ -414,6 +414,12 @@ isInfinite(receiver) {
|| JS('bool', @'# == -Infinity', receiver);
}
+negate(receiver) {
+ if (receiver is !num) return UNINTERCEPTED(receiver.negate());
+
+ return JS('num', @'-#', receiver);
+}
+
round(receiver) {
if (receiver is !num) return UNINTERCEPTED(receiver.round());

Powered by Google App Engine
This is Rietveld 408576698