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

Unified Diff: src/scanner-base.h

Issue 7585030: Added fast detection of one character tokens. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added semicolon. Removed 0x30. Created 9 years, 4 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 | « no previous file | src/scanner-base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scanner-base.h
diff --git a/src/scanner-base.h b/src/scanner-base.h
index 22844bbaf9f1757e539d45bd0eecd80a6379741e..0adba2da42bc88d250a75c70a9c20ef4397fd9ef 100644
--- a/src/scanner-base.h
+++ b/src/scanner-base.h
@@ -618,13 +618,17 @@ class KeywordMatcher {
TH,
TR,
V,
- W
+ W,
+ LAST_STATE = W
};
+
+ STATIC_ASSERT(LAST_STATE <= 0xFF);
+ STATIC_ASSERT(Token::NUM_TOKENS <= 0x100);
struct FirstState {
const char* keyword;
- State state;
- Token::Value token;
+ State state : 8;
+ Token::Value token : 8;
};
// Range of possible first characters of a keyword.
« no previous file with comments | « no previous file | src/scanner-base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698