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

Unified Diff: sdk/lib/_internal/compiler/implementation/constant_system.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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/constant_system_dart.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/constant_system.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/constant_system.dart (revision 17016)
+++ sdk/lib/_internal/compiler/implementation/constant_system.dart (working copy)
@@ -48,6 +48,8 @@
BinaryOperation get subtract;
BinaryOperation get truncatingDivide;
+ const ConstantSystem();
+
Constant createInt(int i);
Constant createDouble(double d);
// We need a diagnostic node to report errors in case the string is malformed.
@@ -69,4 +71,10 @@
bool isBool(Constant constant);
/** Returns true if the [constant] is null at runtime. */
bool isNull(Constant constant);
+
+ Operation lookupUnary(SourceString operator) {
+ if (operator == const SourceString('-')) return negate;
+ if (operator == const SourceString('~')) return bitNot;
+ return null;
+ }
}
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/constant_system_dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698