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

Unified Diff: src/parser.cc

Issue 222123003: Parser cleanup: PreParser doesn't need to produce symbol data any more. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 years, 8 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/preparse-data.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 90171ef75a58bec7a514dc2309beed8c8bccb9ef..18d0ebbe90bb48af93c668c0fa9650b7583ca5b4 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -738,9 +738,9 @@ Handle<String> ParserTraits::GetSymbol(Scanner* scanner) {
return parser_->LookupCachedSymbol(symbol_id);
}
} else if (parser_->cached_data_mode() == PRODUCE_CACHED_DATA) {
- if (parser_->log_->ShouldLogSymbols()) {
- parser_->scanner()->LogSymbol(parser_->log_, parser_->position());
- }
+ // Parser is never used inside lazy functions (it falls back to PreParser
+ // instead), so we can produce the symbol data unconditionally.
+ parser_->scanner()->LogSymbol(parser_->log_, parser_->position());
}
Handle<String> result =
parser_->scanner()->AllocateInternalizedString(parser_->isolate());
@@ -3420,8 +3420,6 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
// With no cached data, we partially parse the function, without
// building an AST. This gathers the data needed to build a lazy
// function.
- // FIXME(marja): Now the PreParser doesn't need to log functions /
- // symbols; only errors -> clean that up.
SingletonLogger logger;
PreParser::PreParseResult result = LazyParseFunctionLiteral(&logger);
if (result == PreParser::kPreParseStackOverflow) {
« no previous file with comments | « no previous file | src/preparse-data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698