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

Unified Diff: src/parsing/parser-base.h

Issue 2404913002: Don't lazy-parse arrow functions if we eager compile them (Closed)
Patch Set: Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser-base.h
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h
index 6f46b2ac96edc859855764a523e5a9d2f506eb26..9ea328daf9fd32e3f1158adbc4338549c7a072bf 100644
--- a/src/parsing/parser-base.h
+++ b/src/parsing/parser-base.h
@@ -3941,7 +3941,8 @@ ParserBase<Impl>::ParseArrowFunctionLiteral(
bool is_lazily_parsed =
(mode() == PARSE_LAZILY &&
formal_parameters.scope
- ->AllowsLazyParsingWithoutUnresolvedVariables());
+ ->AllowsLazyParsingWithoutUnresolvedVariables() &&
+ eager_compile_hint == FunctionLiteral::kShouldLazyCompile);
// TODO(marja): consider lazy-parsing inner arrow functions too. is_this
// handling in Scope::ResolveVariable needs to change.
if (is_lazily_parsed) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698