Commit ad0069e8 authored by Ben Noordhuis's avatar Ben Noordhuis Committed by Yang Guo

compiler: enable optimizer for function literals

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/821553003

Patch from Ben Noordhuis <ben@strongloop.com>.

Cr-Commit-Position: refs/heads/master@{#25992}
parent 7deccd18
...@@ -1238,7 +1238,9 @@ MaybeHandle<JSFunction> Compiler::GetFunctionFromEval( ...@@ -1238,7 +1238,9 @@ MaybeHandle<JSFunction> Compiler::GetFunctionFromEval(
} else { } else {
// Explicitly disable optimization for eval code. We're not yet prepared // Explicitly disable optimization for eval code. We're not yet prepared
// to handle eval-code in the optimizing compiler. // to handle eval-code in the optimizing compiler.
shared_info->DisableOptimization(kEval); if (restriction != ONLY_SINGLE_FUNCTION_LITERAL) {
shared_info->DisableOptimization(kEval);
}
// If caller is strict mode, the result must be in strict mode as well. // If caller is strict mode, the result must be in strict mode as well.
DCHECK(strict_mode == SLOPPY || shared_info->strict_mode() == STRICT); DCHECK(strict_mode == SLOPPY || shared_info->strict_mode() == STRICT);
......
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