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

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

Issue 2865693002: Create closed world for hello world using .dill file (Closed)
Patch Set: 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
Index: pkg/compiler/lib/src/resolution/operators.dart
diff --git a/pkg/compiler/lib/src/resolution/operators.dart b/pkg/compiler/lib/src/resolution/operators.dart
index b524cf4b5726ff4fd73c5ae6342ec9e142665dc9..362750eecfe415963380066b40df9db1b7b2390b 100644
--- a/pkg/compiler/lib/src/resolution/operators.dart
+++ b/pkg/compiler/lib/src/resolution/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;
}

Powered by Google App Engine
This is Rietveld 408576698