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 1386253002: Use Scope::function_kind_ to distinguish arrow function scopes (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
Index: src/preparser.cc
diff --git a/src/preparser.cc b/src/preparser.cc
index 4cea6364a6a369bb6306ec95ee707d8fd9b05843..ecf4a950c0ea8e76192e205020de4713bafb5f40 100644
--- a/src/preparser.cc
+++ b/src/preparser.cc
@@ -111,8 +111,7 @@ PreParser::PreParseResult PreParser::PreParseLazyFunction(
FunctionState top_state(&function_state_, &scope_, top_scope, kNormalFunction,
&top_factory);
scope_->SetLanguageMode(language_mode);
- Scope* function_scope = NewScope(
- scope_, IsArrowFunction(kind) ? ARROW_SCOPE : FUNCTION_SCOPE, kind);
+ Scope* function_scope = NewScope(scope_, FUNCTION_SCOPE, kind);
if (!has_simple_parameters) function_scope->SetHasNonSimpleParameters();
PreParserFactory function_factory(NULL);
FunctionState function_state(&function_state_, &scope_, function_scope, kind,
« no previous file with comments | « src/preparser.h ('k') | src/scopeinfo.cc » ('j') | test/mjsunit/es6/regress/regress-4466.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698