Commit f7ac95c2 authored by Tobias Tebbi's avatar Tobias Tebbi Committed by Commit Bot

[turbofan] constructor inlining registers new nodes with the GraphReducer

Bug: chromium:723802
Change-Id: I8f23d016a5aaf785fcd27cd139a196a148a37069
Reviewed-on: https://chromium-review.googlesource.com/508712
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45424}
parent d53bffb2
...@@ -244,8 +244,6 @@ void GraphReducer::ReplaceWithValue(Node* node, Node* value, Node* effect, ...@@ -244,8 +244,6 @@ void GraphReducer::ReplaceWithValue(Node* node, Node* value, Node* effect,
DCHECK_NOT_NULL(control); DCHECK_NOT_NULL(control);
edge.UpdateTo(control); edge.UpdateTo(control);
Revisit(user); Revisit(user);
// TODO(jarin) Check that the node cannot throw (otherwise, it
// would have to be connected via IfSuccess/IfException).
} }
} else if (NodeProperties::IsEffectEdge(edge)) { } else if (NodeProperties::IsEffectEdge(edge)) {
DCHECK_NOT_NULL(effect); DCHECK_NOT_NULL(effect);
......
...@@ -687,9 +687,8 @@ Reduction JSInliner::ReduceJSCall(Node* node) { ...@@ -687,9 +687,8 @@ Reduction JSInliner::ReduceJSCall(Node* node) {
result = result =
graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2), graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2),
create, node, merge); create, node, merge);
NodeProperties::ReplaceUses(node_success, node_success, node_success, ReplaceWithValue(node_success, node_success, node_success, merge);
merge); // Fix input destroyed by the above {ReplaceWithValue} call.
// Fix input destroyed by the above {ReplaceUses} call.
NodeProperties::ReplaceControlInput(branch_is_undefined, node_success, NodeProperties::ReplaceControlInput(branch_is_undefined, node_success,
0); 0);
} else { } else {
...@@ -702,7 +701,7 @@ Reduction JSInliner::ReduceJSCall(Node* node) { ...@@ -702,7 +701,7 @@ Reduction JSInliner::ReduceJSCall(Node* node) {
check, node, create); check, node, create);
} }
receiver = create; // The implicit receiver. receiver = create; // The implicit receiver.
NodeProperties::ReplaceUses(dummy, result); ReplaceWithValue(dummy, result);
} else if (IsDerivedConstructor(shared_info->kind())) { } else if (IsDerivedConstructor(shared_info->kind())) {
Node* node_success = Node* node_success =
NodeProperties::FindSuccessfulControlProjection(node); NodeProperties::FindSuccessfulControlProjection(node);
...@@ -726,9 +725,9 @@ Reduction JSInliner::ReduceJSCall(Node* node) { ...@@ -726,9 +725,9 @@ Reduction JSInliner::ReduceJSCall(Node* node) {
NodeProperties::MergeControlToEnd(graph(), common(), NodeProperties::MergeControlToEnd(graph(), common(),
branch_is_receiver_false); branch_is_receiver_false);
NodeProperties::ReplaceUses(node_success, node_success, node_success, ReplaceWithValue(node_success, node_success, node_success,
branch_is_receiver_true); branch_is_receiver_true);
// Fix input destroyed by the above {ReplaceUses} call. // Fix input destroyed by the above {ReplaceWithValue} call.
NodeProperties::ReplaceControlInput(branch_is_receiver, node_success, 0); NodeProperties::ReplaceControlInput(branch_is_receiver, node_success, 0);
} }
node->ReplaceInput(1, receiver); node->ReplaceInput(1, receiver);
......
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