summaryrefslogtreecommitdiff
path: root/deps/v8/src/token.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/token.h')
-rw-r--r--deps/v8/src/token.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/deps/v8/src/token.h b/deps/v8/src/token.h
index 2a228d67c..a60704cd0 100644
--- a/deps/v8/src/token.h
+++ b/deps/v8/src/token.h
@@ -66,9 +66,8 @@ namespace internal {
T(DEC, "--", 0) \
\
/* Assignment operators. */ \
- /* IsAssignmentOp() and Assignment::is_compound() relies on */ \
- /* this block of enum values being contiguous and sorted in the */ \
- /* same order! */ \
+ /* IsAssignmentOp() 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_CONST, "=init_const", 2) /* AST-use only. */ \
T(ASSIGN, "=", 2) \
@@ -212,12 +211,14 @@ class Token {
};
#undef T
+#ifdef DEBUG
// Returns a string corresponding to the C++ token name
// (e.g. "LT" for the token LT).
static const char* Name(Value tok) {
ASSERT(0 <= tok && tok < NUM_TOKENS);
return name_[tok];
}
+#endif
// Predicates
static bool IsAssignmentOp(Value tok) {
@@ -260,7 +261,9 @@ class Token {
}
private:
+#ifdef DEBUG
static const char* name_[NUM_TOKENS];
+#endif
static const char* string_[NUM_TOKENS];
static int8_t precedence_[NUM_TOKENS];
};