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

Unified Diff: runtime/vm/symbols.cc

Issue 316633002: Speed up identifying keywords in scanner, by using extra table. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 | « runtime/vm/scanner.cc ('k') | runtime/vm/token.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/symbols.cc
diff --git a/runtime/vm/symbols.cc b/runtime/vm/symbols.cc
index 754de7e2dd1a28fd9043e1143cc71d4d827bc5ae..5f1d8d00b9155a32030e029310110e286590363b 100644
--- a/runtime/vm/symbols.cc
+++ b/runtime/vm/symbols.cc
@@ -49,7 +49,7 @@ const char* Symbols::Name(SymbolId symbol) {
const String& Symbols::Keyword(Token::Kind keyword) {
const int kw_index = keyword - Token::kFirstKeyword;
- ASSERT((0 <= kw_index) && (kw_index < Token::numKeywords));
+ ASSERT((0 <= kw_index) && (kw_index < Token::kNumKeywords));
// First keyword symbol is in symbol_handles_[kKwTableStart + 1].
const intptr_t keyword_id = Symbols::kKwTableStart + 1 + kw_index;
ASSERT(symbol_handles_[keyword_id] != NULL);
« no previous file with comments | « runtime/vm/scanner.cc ('k') | runtime/vm/token.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698