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

Unified Diff: src/token.h

Issue 1431873006: Use a single Token::INIT for all variable initialization (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm, simplify fvar code Created 5 years, 1 month 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 | « src/preparser.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/token.h
diff --git a/src/token.h b/src/token.h
index 2443e842386a04b9c6a8f11d1b4f6336ab6314c7..88d4eabbd572c504bbfafc2f219ff2e7cfa4ad91 100644
--- a/src/token.h
+++ b/src/token.h
@@ -50,10 +50,7 @@ namespace internal {
/* IsAssignmentOp() and Assignment::is_compound() relies on */ \
/* this block of enum values being contiguous and sorted in the */ \
/* same order! */ \
- T(INIT_VAR, "=init_var", 2) /* AST-use only. */ \
- T(INIT_LET, "=init_let", 2) /* AST-use only. */ \
- T(INIT_CONST, "=init_const", 2) /* AST-use only. */ \
- T(INIT_CONST_LEGACY, "=init_const_legacy", 2) /* AST-use only. */ \
+ T(INIT, "=init", 2) /* AST-use only. */ \
T(ASSIGN, "=", 2) \
T(ASSIGN_BIT_OR, "|=", 2) \
T(ASSIGN_BIT_XOR, "^=", 2) \
@@ -214,7 +211,7 @@ class Token {
}
static bool IsAssignmentOp(Value tok) {
- return INIT_VAR <= tok && tok <= ASSIGN_MOD;
+ return INIT <= tok && tok <= ASSIGN_MOD;
}
static bool IsBinaryOp(Value op) {
« no previous file with comments | « src/preparser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698