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

Unified Diff: runtime/vm/token.h

Issue 23710024: Change the order of bitwise operators and equality/relational operators. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added tests. Created 7 years, 3 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: runtime/vm/token.h
diff --git a/runtime/vm/token.h b/runtime/vm/token.h
index 1b58858602ebf3c919abe7845d33a5bd57d37d41..b6da9935c15d830bcccf387484c917d9d33301ac 100644
--- a/runtime/vm/token.h
+++ b/runtime/vm/token.h
@@ -14,11 +14,11 @@ namespace dart {
// 13 multiplicative * / ~/ %
// 12 additive + -
// 11 shift << >>
-// 10 relational >= > <= < is as
-// 9 equality == != === !==
-// 8 bitwise and &
-// 7 bitwise xor ^
-// 6 bitwise or |
+// 10 bitwise and &
+// 9 bitwise xor ^
+// 8 bitwise or |
+// 7 relational >= > <= < is as
+// 6 equality == != === !==
// 5 logical and &&
// 4 logical or ||
// 3 conditional ?
@@ -67,9 +67,9 @@ namespace dart {
TOK(kCOMMA, ",", 1, kNoAttribute) \
TOK(kOR, "||", 4, kNoAttribute) \
TOK(kAND, "&&", 5, kNoAttribute) \
- TOK(kBIT_OR, "|", 6, kNoAttribute) \
- TOK(kBIT_XOR, "^", 7, kNoAttribute) \
- TOK(kBIT_AND, "&", 8, kNoAttribute) \
+ TOK(kBIT_OR, "|", 8, kNoAttribute) \
+ TOK(kBIT_XOR, "^", 9, kNoAttribute) \
+ TOK(kBIT_AND, "&", 10, kNoAttribute) \
TOK(kBIT_NOT, "~", 0, kNoAttribute) \
\
/* Shift operators. */ \
@@ -92,18 +92,18 @@ namespace dart {
/* Equality operators. */ \
/* Please update IsEqualityOperator() if you make */ \
/* any changes to this block. */ \
- TOK(kEQ, "==", 9, kNoAttribute) \
- TOK(kNE, "!=", 9, kNoAttribute) \
- TOK(kEQ_STRICT, "===", 9, kNoAttribute) \
- TOK(kNE_STRICT, "!==", 9, kNoAttribute) \
+ TOK(kEQ, "==", 6, kNoAttribute) \
+ TOK(kNE, "!=", 6, kNoAttribute) \
+ TOK(kEQ_STRICT, "===", 6, kNoAttribute) \
+ TOK(kNE_STRICT, "!==", 6, kNoAttribute) \
\
/* Relational operators. */ \
/* Please update IsRelationalOperator() if you make */ \
/* any changes to this block. */ \
- TOK(kLT, "<", 10, kNoAttribute) \
- TOK(kGT, ">", 10, kNoAttribute) \
- TOK(kLTE, "<=", 10, kNoAttribute) \
- TOK(kGTE, ">=", 10, kNoAttribute) \
+ TOK(kLT, "<", 7, kNoAttribute) \
+ TOK(kGT, ">", 7, kNoAttribute) \
+ TOK(kLTE, "<=", 7, kNoAttribute) \
+ TOK(kGTE, ">=", 7, kNoAttribute) \
\
/* Internal token for !(expr is Type) negative type test operator */ \
TOK(kISNOT, "", 10, kNoAttribute) \
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/scanner/token.dart » ('j') | tests/co19/co19-co19.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698