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

Unified Diff: src/preparser.cc

Issue 949763003: WIP: new.target (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
Index: src/preparser.cc
diff --git a/src/preparser.cc b/src/preparser.cc
index e7fff33d3bf7f6d47b96a9debbe5ac7a52c0957f..38be597a057a02bb20767f4a5c9c8c782b0b11b2 100644
--- a/src/preparser.cc
+++ b/src/preparser.cc
@@ -104,7 +104,8 @@ PreParser::PreParseResult PreParser::PreParseLazyFunction(
FunctionState top_state(&function_state_, &scope_, top_scope, kNormalFunction,
&top_factory);
scope_->SetLanguageMode(language_mode);
- Scope* function_scope = NewScope(scope_, FUNCTION_SCOPE);
+ Scope* function_scope =
+ NewScope(scope_, IsArrowFunction(kind) ? ARROW_SCOPE : FUNCTION_SCOPE);
PreParserFactory function_factory(NULL);
FunctionState function_state(&function_state_, &scope_, function_scope, kind,
&function_factory);
@@ -960,7 +961,7 @@ void PreParser::ParseLazyFunctionLiteralBody(bool* ok) {
log_->LogFunction(body_start, body_end,
function_state_->materialized_literal_count(),
function_state_->expected_property_count(), language_mode(),
- scope_->uses_super_property());
+ scope_->uses_super_property(), scope_->uses_new_target());
}

Powered by Google App Engine
This is Rietveld 408576698