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

Unified Diff: src/scanner-base.h

Issue 7607031: Update gc branch to bleeding_edge revision 8862. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Fix bug in weak-map merge 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 | « src/runtime.cc ('k') | 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 3d67d4e1eadb5633e82e11d10204f1ebe4de5ec7..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.
@@ -633,7 +637,7 @@ class KeywordMatcher {
static const unsigned int kFirstCharRangeLength =
kFirstCharRangeMax - kFirstCharRangeMin + 1;
// State map for first keyword character range.
- static FirstState first_states_[kFirstCharRangeLength];
+ static const FirstState first_states_[kFirstCharRangeLength];
// If input equals keyword's character at position, continue matching keyword
// from that position.
« no previous file with comments | « src/runtime.cc ('k') | src/scanner-base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698