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

Unified Diff: src/preparser.cc

Issue 633373003: Simplify AST ID generation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 years, 2 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/preparser.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.cc
diff --git a/src/preparser.cc b/src/preparser.cc
index 27a7b9ed4bc706a04e7bed2e9b2e90bf8448924f..847d2c2935ef9905daf17fed6796e7a9aabc9e66 100644
--- a/src/preparser.cc
+++ b/src/preparser.cc
@@ -116,12 +116,13 @@ PreParser::PreParseResult PreParser::PreParseLazyFunction(
log_ = log;
// Lazy functions always have trivial outer scopes (no with/catch scopes).
PreParserScope top_scope(scope_, GLOBAL_SCOPE);
- FunctionState top_state(&function_state_, &scope_, &top_scope, NULL,
- this->ast_value_factory());
+ PreParserFactory top_factory(NULL, NULL, NULL);
+ FunctionState top_state(&function_state_, &scope_, &top_scope, &top_factory);
scope_->SetStrictMode(strict_mode);
PreParserScope function_scope(scope_, FUNCTION_SCOPE);
- FunctionState function_state(&function_state_, &scope_, &function_scope, NULL,
- this->ast_value_factory());
+ PreParserFactory function_factory(NULL, NULL, NULL);
+ FunctionState function_state(&function_state_, &scope_, &function_scope,
+ &function_factory);
function_state.set_is_generator(is_generator);
DCHECK_EQ(Token::LBRACE, scanner()->current_token());
bool ok = true;
@@ -824,8 +825,9 @@ PreParser::Expression PreParser::ParseFunctionLiteral(
// Parse function body.
ScopeType outer_scope_type = scope_->type();
PreParserScope function_scope(scope_, FUNCTION_SCOPE);
- FunctionState function_state(&function_state_, &scope_, &function_scope, NULL,
- this->ast_value_factory());
+ PreParserFactory factory(NULL, NULL, NULL);
+ FunctionState function_state(&function_state_, &scope_, &function_scope,
+ &factory);
function_state.set_is_generator(IsGeneratorFunction(kind));
// FormalParameterList ::
// '(' (Identifier)*[','] ')'
« no previous file with comments | « src/preparser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698