diff options
Diffstat (limited to 'deps/v8/src/compiler/control-flow-optimizer.cc')
-rw-r--r-- | deps/v8/src/compiler/control-flow-optimizer.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/deps/v8/src/compiler/control-flow-optimizer.cc b/deps/v8/src/compiler/control-flow-optimizer.cc index 6027c8201c..7177a6069d 100644 --- a/deps/v8/src/compiler/control-flow-optimizer.cc +++ b/deps/v8/src/compiler/control-flow-optimizer.cc @@ -83,6 +83,7 @@ bool ControlFlowOptimizer::TryBuildSwitch(Node* node) { Node* if_false; Node* if_true; + int32_t order = 1; while (true) { BranchMatcher matcher(branch); DCHECK(matcher.Matched()); @@ -109,7 +110,7 @@ bool ControlFlowOptimizer::TryBuildSwitch(Node* node) { branch->NullAllInputs(); if_true->ReplaceInput(0, node); } - NodeProperties::ChangeOp(if_true, common()->IfValue(value)); + NodeProperties::ChangeOp(if_true, common()->IfValue(value, order++)); if_false->NullAllInputs(); Enqueue(if_true); @@ -128,7 +129,7 @@ bool ControlFlowOptimizer::TryBuildSwitch(Node* node) { node->ReplaceInput(0, index); NodeProperties::ChangeOp(node, common()->Switch(values.size() + 1)); if_true->ReplaceInput(0, node); - NodeProperties::ChangeOp(if_true, common()->IfValue(value)); + NodeProperties::ChangeOp(if_true, common()->IfValue(value, order++)); Enqueue(if_true); if_false->ReplaceInput(0, node); NodeProperties::ChangeOp(if_false, common()->IfDefault()); |