Commit 2ec6fcd1 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[turbofan] Ship TurboFan with new.target references.

This correctly marks functions containing a new.target reference as
being disabled with Crankshaft, which would have bailed out anyways.
Also note that this will trigger TurboFan for such functions and hence
widens the TurboFan intake valve.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#32444}
parent 5af6017d
......@@ -571,6 +571,7 @@ bool AstNumberingVisitor::Renumber(FunctionLiteral* node) {
DisableOptimization(kFunctionWithIllegalRedeclaration);
return Finish(node);
}
if (scope->new_target_var()) DisableCrankshaft(kSuperReference);
if (scope->calls_eval()) DisableOptimization(kFunctionCallsEval);
if (scope->arguments() != NULL && !scope->arguments()->IsStackAllocated()) {
DisableCrankshaft(kContextAllocatedArguments);
......
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