Commit 724d8dfe authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Fully reduce node in JSCallReducer::ReduceSpreadCall.

When turning a JSCallWithSpread into a JSCall or a JSConstructWithSpread
into a JSConstruct, we need to (manually) invoke the JSCallReducer logic
again on the changed node to make sure that optimizations that are now
possible for the JSCall or JSConstruct operator are properly applied.

BUG=v8:5932,v8:5895,v8:6344,v8:6399,v8:6400
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2882153003
Cr-Commit-Position: refs/heads/master@{#45325}
parent cd33ec55
...@@ -506,10 +506,13 @@ Reduction JSCallReducer::ReduceSpreadCall(Node* node, int arity) { ...@@ -506,10 +506,13 @@ Reduction JSCallReducer::ReduceSpreadCall(Node* node, int arity) {
// through here. // through here.
if (node->opcode() == IrOpcode::kJSCallWithSpread) { if (node->opcode() == IrOpcode::kJSCallWithSpread) {
NodeProperties::ChangeOp(node, javascript()->Call(arity + 1)); NodeProperties::ChangeOp(node, javascript()->Call(arity + 1));
Reduction const r = ReduceJSCall(node);
return r.Changed() ? r : Changed(node);
} else { } else {
NodeProperties::ChangeOp(node, javascript()->Construct(arity + 2)); NodeProperties::ChangeOp(node, javascript()->Construct(arity + 2));
Reduction const r = ReduceJSConstruct(node);
return r.Changed() ? r : Changed(node);
} }
return Changed(node);
} }
namespace { namespace {
......
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