Commit 515873cc authored by jochen's avatar jochen Committed by Commit bot

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}
parent 4e0b685a
...@@ -3941,7 +3941,8 @@ ParserBase<Impl>::ParseArrowFunctionLiteral( ...@@ -3941,7 +3941,8 @@ ParserBase<Impl>::ParseArrowFunctionLiteral(
bool is_lazily_parsed = bool is_lazily_parsed =
(mode() == PARSE_LAZILY && (mode() == PARSE_LAZILY &&
formal_parameters.scope formal_parameters.scope
->AllowsLazyParsingWithoutUnresolvedVariables()); ->AllowsLazyParsingWithoutUnresolvedVariables() &&
eager_compile_hint == FunctionLiteral::kShouldLazyCompile);
// TODO(marja): consider lazy-parsing inner arrow functions too. is_this // TODO(marja): consider lazy-parsing inner arrow functions too. is_this
// handling in Scope::ResolveVariable needs to change. // handling in Scope::ResolveVariable needs to change.
if (is_lazily_parsed) { if (is_lazily_parsed) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment