Index: src/compiler/js-call-reducer.cc |
diff --git a/src/compiler/js-call-reducer.cc b/src/compiler/js-call-reducer.cc |
index 34217e7d9a91763cd2214813463d1f2f0b0d2081..892dcc70ce361a413bf4b9404560c77e38998648 100644 |
--- a/src/compiler/js-call-reducer.cc |
+++ b/src/compiler/js-call-reducer.cc |
@@ -329,16 +329,8 @@ Reduction JSCallReducer::ReduceJSCallFunction(Node* node) { |
Node* check = effect = |
graph()->NewNode(javascript()->StrictEqual(), target, array_function, |
context, effect, control); |
- Node* branch = |
- graph()->NewNode(common()->Branch(BranchHint::kTrue), check, control); |
- Node* if_false = graph()->NewNode(common()->IfFalse(), branch); |
- Node* deoptimize = |
- graph()->NewNode(common()->Deoptimize(DeoptimizeKind::kEager), |
- frame_state, effect, if_false); |
- // TODO(bmeurer): This should be on the AdvancedReducer somehow. |
- NodeProperties::MergeControlToEnd(graph(), common(), deoptimize); |
- Revisit(graph()->end()); |
- control = graph()->NewNode(common()->IfTrue(), branch); |
+ control = graph()->NewNode(common()->DeoptimizeUnless(), check, frame_state, |
+ effect, control); |
// Turn the {node} into a {JSCreateArray} call. |
NodeProperties::ReplaceValueInput(node, array_function, 0); |
@@ -355,16 +347,8 @@ Reduction JSCallReducer::ReduceJSCallFunction(Node* node) { |
Node* check = effect = |
graph()->NewNode(javascript()->StrictEqual(), target, target_function, |
context, effect, control); |
- Node* branch = |
- graph()->NewNode(common()->Branch(BranchHint::kTrue), check, control); |
- Node* if_false = graph()->NewNode(common()->IfFalse(), branch); |
- Node* deoptimize = |
- graph()->NewNode(common()->Deoptimize(DeoptimizeKind::kEager), |
- frame_state, effect, if_false); |
- // TODO(bmeurer): This should be on the AdvancedReducer somehow. |
- NodeProperties::MergeControlToEnd(graph(), common(), deoptimize); |
- Revisit(graph()->end()); |
- control = graph()->NewNode(common()->IfTrue(), branch); |
+ control = graph()->NewNode(common()->DeoptimizeUnless(), check, |
+ frame_state, effect, control); |
// Specialize the JSCallFunction node to the {target_function}. |
NodeProperties::ReplaceValueInput(node, target_function, 0); |
@@ -473,16 +457,8 @@ Reduction JSCallReducer::ReduceJSCallConstruct(Node* node) { |
Node* check = effect = |
graph()->NewNode(javascript()->StrictEqual(), target, array_function, |
context, effect, control); |
- Node* branch = |
- graph()->NewNode(common()->Branch(BranchHint::kTrue), check, control); |
- Node* if_false = graph()->NewNode(common()->IfFalse(), branch); |
- Node* deoptimize = |
- graph()->NewNode(common()->Deoptimize(DeoptimizeKind::kEager), |
- frame_state, effect, if_false); |
- // TODO(bmeurer): This should be on the AdvancedReducer somehow. |
- NodeProperties::MergeControlToEnd(graph(), common(), deoptimize); |
- Revisit(graph()->end()); |
- control = graph()->NewNode(common()->IfTrue(), branch); |
+ control = graph()->NewNode(common()->DeoptimizeUnless(), check, frame_state, |
+ effect, control); |
// Turn the {node} into a {JSCreateArray} call. |
NodeProperties::ReplaceEffectInput(node, effect); |
@@ -505,16 +481,8 @@ Reduction JSCallReducer::ReduceJSCallConstruct(Node* node) { |
Node* check = effect = |
graph()->NewNode(javascript()->StrictEqual(), target, target_function, |
context, effect, control); |
- Node* branch = |
- graph()->NewNode(common()->Branch(BranchHint::kTrue), check, control); |
- Node* if_false = graph()->NewNode(common()->IfFalse(), branch); |
- Node* deoptimize = |
- graph()->NewNode(common()->Deoptimize(DeoptimizeKind::kEager), |
- frame_state, effect, if_false); |
- // TODO(bmeurer): This should be on the AdvancedReducer somehow. |
- NodeProperties::MergeControlToEnd(graph(), common(), deoptimize); |
- Revisit(graph()->end()); |
- control = graph()->NewNode(common()->IfTrue(), branch); |
+ control = graph()->NewNode(common()->DeoptimizeUnless(), check, |
+ frame_state, effect, control); |
// Specialize the JSCallConstruct node to the {target_function}. |
NodeProperties::ReplaceValueInput(node, target_function, 0); |