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

Side by Side Diff: src/token.h

Issue 113336: Optimize the lexical scanner by selective inlining, and... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/scanner.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 T(NUMBER, NULL, 0) \ 190 T(NUMBER, NULL, 0) \
191 T(STRING, NULL, 0) \ 191 T(STRING, NULL, 0) \
192 \ 192 \
193 /* Identifiers (not keywords or future reserved words). */ \ 193 /* Identifiers (not keywords or future reserved words). */ \
194 T(IDENTIFIER, NULL, 0) \ 194 T(IDENTIFIER, NULL, 0) \
195 \ 195 \
196 /* Illegal token - not able to scan. */ \ 196 /* Illegal token - not able to scan. */ \
197 T(ILLEGAL, "ILLEGAL", 0) \ 197 T(ILLEGAL, "ILLEGAL", 0) \
198 \ 198 \
199 /* Scanner-internal use only. */ \ 199 /* Scanner-internal use only. */ \
200 T(COMMENT, NULL, 0) 200 T(WHITESPACE, NULL, 0)
201 201
202 202
203 class Token { 203 class Token {
204 public: 204 public:
205 // All token values. 205 // All token values.
206 #define T(name, string, precedence) name, 206 #define T(name, string, precedence) name,
207 enum Value { 207 enum Value {
208 TOKEN_LIST(T, T, IGNORE_TOKEN) 208 TOKEN_LIST(T, T, IGNORE_TOKEN)
209 NUM_TOKENS 209 NUM_TOKENS
210 }; 210 };
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 #ifdef DEBUG 272 #ifdef DEBUG
273 static const char* name_[NUM_TOKENS]; 273 static const char* name_[NUM_TOKENS];
274 #endif 274 #endif
275 static const char* string_[NUM_TOKENS]; 275 static const char* string_[NUM_TOKENS];
276 static int8_t precedence_[NUM_TOKENS]; 276 static int8_t precedence_[NUM_TOKENS];
277 }; 277 };
278 278
279 } } // namespace v8::internal 279 } } // namespace v8::internal
280 280
281 #endif // V8_TOKEN_H_ 281 #endif // V8_TOKEN_H_
OLDNEW
« no previous file with comments | « src/scanner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698