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

Unified Diff: pkg/compiler/lib/src/elements/operators.dart

Issue 2865693002: Create closed world for hello world using .dill file (Closed)
Patch Set: Updated cf. comments. Created 3 years, 7 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 | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/frontend_strategy.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/operators.dart
diff --git a/pkg/compiler/lib/src/elements/operators.dart b/pkg/compiler/lib/src/elements/operators.dart
index 2583fdfbbec32b46afdd00705ce6db8bd750cd62..adf1813b261f3a540bb2fd0db7d49277e0734c11 100644
--- a/pkg/compiler/lib/src/elements/operators.dart
+++ b/pkg/compiler/lib/src/elements/operators.dart
@@ -189,6 +189,19 @@ class BinaryOperator {
static BinaryOperator parse(String value) {
switch (value) {
+ case '&&':
+ return LOGICAL_AND;
+ case '||':
+ return LOGICAL_OR;
+ case '??':
+ return IF_NULL;
+ default:
+ return parseUserDefinable(value);
+ }
+ }
+
+ static BinaryOperator parseUserDefinable(String value) {
+ switch (value) {
case '==':
return EQ;
case '!=':
@@ -225,12 +238,6 @@ class BinaryOperator {
return XOR;
case '|':
return OR;
- case '&&':
- return LOGICAL_AND;
- case '||':
- return LOGICAL_OR;
- case '??':
- return IF_NULL;
default:
return null;
}
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/frontend_strategy.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698