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

Unified Diff: src/parsing/pattern-rewriter.cc

Issue 2301183003: Move sloppy block function hoisting logic from Parser to Scope. (Closed)
Patch Set: code review (nikolaos@) Created 4 years, 3 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/parsing/parser.cc ('k') | test/mjsunit/es6/block-sloppy-function.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/pattern-rewriter.cc
diff --git a/src/parsing/pattern-rewriter.cc b/src/parsing/pattern-rewriter.cc
index e5211b41947156c64bf9477ec83015a69ec059ad..2e4057bd3d548b399096957a0c1e04492af52ae6 100644
--- a/src/parsing/pattern-rewriter.cc
+++ b/src/parsing/pattern-rewriter.cc
@@ -146,10 +146,10 @@ void Parser::PatternRewriter::VisitVariableProxy(VariableProxy* pattern) {
parser_->scanner()->location().end_pos);
Declaration* declaration = factory()->NewVariableDeclaration(
proxy, descriptor_->scope, descriptor_->declaration_pos);
- Variable* var = parser_->Declare(declaration, descriptor_->declaration_kind,
- descriptor_->mode,
- DefaultInitializationFlag(descriptor_->mode),
- ok_, descriptor_->hoist_scope);
+ Variable* var = parser_->Declare(
+ declaration, descriptor_->declaration_kind, descriptor_->mode,
+ Variable::DefaultInitializationFlag(descriptor_->mode), ok_,
+ descriptor_->hoist_scope);
if (!*ok_) return;
DCHECK_NOT_NULL(var);
DCHECK(proxy->is_resolved());
« no previous file with comments | « src/parsing/parser.cc ('k') | test/mjsunit/es6/block-sloppy-function.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698