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

Unified Diff: src/parser.cc

Issue 974783003: Speed up parsing of smis (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ignore partially parsed octal-seeming decimal numbers Created 5 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 | « no previous file | src/preparser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index aa6ee8ccb6c67a3d210a39b18e97a31f9808ea32..b82b652ce140b0439bc8471e333106360c3db4e0 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -694,6 +694,10 @@ Literal* ParserTraits::ExpressionFromLiteral(Token::Value token, int pos,
return factory->NewBooleanLiteral(true, pos);
case Token::FALSE_LITERAL:
return factory->NewBooleanLiteral(false, pos);
+ case Token::SMI: {
+ int value = scanner->smi_value();
+ return factory->NewSmiLiteral(value, pos);
+ }
case Token::NUMBER: {
double value = scanner->DoubleValue();
return factory->NewNumberLiteral(value, pos);
« no previous file with comments | « no previous file | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698