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

Unified Diff: src/token.h

Issue 6529032: Merge 6168:6800 from bleeding_edge to experimental/gc branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 10 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
« no previous file with comments | « src/stub-cache.cc ('k') | src/top.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/token.h
===================================================================
--- src/token.h (revision 6800)
+++ src/token.h (working copy)
@@ -155,38 +155,6 @@
K(WHILE, "while", 0) \
K(WITH, "with", 0) \
\
- /* Future reserved words (ECMA-262, section 7.5.3, page 14). */ \
- F(ABSTRACT, "abstract", 0) \
- F(BOOLEAN, "boolean", 0) \
- F(BYTE, "byte", 0) \
- F(CHAR, "char", 0) \
- F(CLASS, "class", 0) \
- K(CONST, "const", 0) \
- F(DOUBLE, "double", 0) \
- F(ENUM, "enum", 0) \
- F(EXPORT, "export", 0) \
- F(EXTENDS, "extends", 0) \
- F(FINAL, "final", 0) \
- F(FLOAT, "float", 0) \
- F(GOTO, "goto", 0) \
- F(IMPLEMENTS, "implements", 0) \
- F(IMPORT, "import", 0) \
- F(INT, "int", 0) \
- F(INTERFACE, "interface", 0) \
- F(LONG, "long", 0) \
- K(NATIVE, "native", 0) \
- F(PACKAGE, "package", 0) \
- F(PRIVATE, "private", 0) \
- F(PROTECTED, "protected", 0) \
- F(PUBLIC, "public", 0) \
- F(SHORT, "short", 0) \
- F(STATIC, "static", 0) \
- F(SUPER, "super", 0) \
- F(SYNCHRONIZED, "synchronized", 0) \
- F(THROWS, "throws", 0) \
- F(TRANSIENT, "transient", 0) \
- F(VOLATILE, "volatile", 0) \
- \
/* Literals (ECMA-262, section 7.8, page 16). */ \
K(NULL_LITERAL, "null", 0) \
K(TRUE_LITERAL, "true", 0) \
@@ -197,6 +165,11 @@
/* Identifiers (not keywords or future reserved words). */ \
T(IDENTIFIER, NULL, 0) \
\
+ /* Future reserved words (ECMA-262, section 7.6.1.2). */ \
+ T(FUTURE_RESERVED_WORD, NULL, 0) \
+ K(CONST, "const", 0) \
+ K(NATIVE, "native", 0) \
+ \
/* Illegal token - not able to scan. */ \
T(ILLEGAL, "ILLEGAL", 0) \
\
@@ -217,7 +190,7 @@
// 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);
+ ASSERT(tok < NUM_TOKENS); // tok is unsigned
return name_[tok];
}
@@ -292,14 +265,14 @@
// (.e., "<" for the token LT) or NULL if the token doesn't
// have a (unique) string (e.g. an IDENTIFIER).
static const char* String(Value tok) {
- ASSERT(0 <= tok && tok < NUM_TOKENS);
+ ASSERT(tok < NUM_TOKENS); // tok is unsigned.
return string_[tok];
}
// Returns the precedence > 0 for binary and compare
// operators; returns 0 otherwise.
static int Precedence(Value tok) {
- ASSERT(0 <= tok && tok < NUM_TOKENS);
+ ASSERT(tok < NUM_TOKENS); // tok is unsigned.
return precedence_[tok];
}
« no previous file with comments | « src/stub-cache.cc ('k') | src/top.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698