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

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

Issue 1867333002: Add kinds for serialization. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Rebased Created 4 years, 8 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 60a28a5674093ae2a1f1a407d71686bdcc4a543e..06fd4683a108dbb68ac387c4e26307f02d08129f 100644
--- a/pkg/compiler/lib/src/resolution/operators.dart
+++ b/pkg/compiler/lib/src/resolution/operators.dart
@@ -427,6 +427,24 @@ class AssignmentOperator {
return null;
}
}
+
+ static AssignmentOperator fromKind(AssignmentOperatorKind kind) {
+ switch (kind) {
+ case AssignmentOperatorKind.ASSIGN: return ASSIGN;
+ case AssignmentOperatorKind.IF_NULL: return IF_NULL;
+ case AssignmentOperatorKind.ADD: return ADD;
+ case AssignmentOperatorKind.SUB: return SUB;
+ case AssignmentOperatorKind.MUL: return MUL;
+ case AssignmentOperatorKind.DIV: return DIV;
+ case AssignmentOperatorKind.IDIV: return IDIV;
+ case AssignmentOperatorKind.MOD: return MOD;
+ case AssignmentOperatorKind.SHL: return SHL;
+ case AssignmentOperatorKind.SHR: return SHR;
+ case AssignmentOperatorKind.AND: return AND;
+ case AssignmentOperatorKind.OR: return OR;
+ case AssignmentOperatorKind.XOR: return XOR;
+ }
+ }
}
enum IncDecOperatorKind { INC, DEC }
@@ -460,4 +478,11 @@ class IncDecOperator {
return null;
}
}
+
+ static IncDecOperator fromKind(IncDecOperatorKind kind) {
+ switch (kind) {
+ case IncDecOperatorKind.INC: return INC;
+ case IncDecOperatorKind.DEC: return DEC;
+ }
+ }
}
« no previous file with comments | « pkg/compiler/lib/src/resolution/access_semantics.dart ('k') | pkg/compiler/lib/src/resolution/send_structure.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698