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}
This commit is contained in:
parent
7deccd18ed
commit
ad0069e8fe
@ -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.
|
||||||
|
if (restriction != ONLY_SINGLE_FUNCTION_LITERAL) {
|
||||||
shared_info->DisableOptimization(kEval);
|
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);
|
||||||
|
Loading…
Reference in New Issue
Block a user