Don't lazy-parse arrow functions if we eager compile them
R=verwaest@chromium.org BUG= Review-Url: https://codereview.chromium.org/2404913002 Cr-Commit-Position: refs/heads/master@{#40152}
This commit is contained in:
parent
4e0b685acc
commit
515873cc9b
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user