OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/effect-control-linearizer.h" | 5 #include "src/compiler/effect-control-linearizer.h" |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/compiler/access-builder.h" | 8 #include "src/compiler/access-builder.h" |
9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 } else { | 269 } else { |
270 for (Edge edge : phi->use_edges()) { | 270 for (Edge edge : phi->use_edges()) { |
271 Node* control = NodeProperties::GetControlInput(edge.from()); | 271 Node* control = NodeProperties::GetControlInput(edge.from()); |
272 if (NodeProperties::IsPhi(edge.from())) { | 272 if (NodeProperties::IsPhi(edge.from())) { |
273 control = NodeProperties::GetControlInput(control, edge.index()); | 273 control = NodeProperties::GetControlInput(control, edge.index()); |
274 } | 274 } |
275 DCHECK(control == matcher.IfTrue() || control == matcher.IfFalse()); | 275 DCHECK(control == matcher.IfTrue() || control == matcher.IfFalse()); |
276 edge.UpdateTo((control == matcher.IfTrue()) ? phi_true : phi_false); | 276 edge.UpdateTo((control == matcher.IfTrue()) ? phi_true : phi_false); |
277 } | 277 } |
278 } | 278 } |
279 true_block_data->current_effect = phi_true; | 279 if (phi->opcode() == IrOpcode::kEffectPhi) { |
280 false_block_data->current_effect = phi_false; | 280 true_block_data->current_effect = phi_true; |
| 281 false_block_data->current_effect = phi_false; |
| 282 } |
281 phi->Kill(); | 283 phi->Kill(); |
282 } | 284 } |
283 // Fix up IfTrue and IfFalse and kill all dead nodes. | 285 // Fix up IfTrue and IfFalse and kill all dead nodes. |
284 if (branch == block->control_input()) { | 286 if (branch == block->control_input()) { |
285 true_block_data->current_control = merge_true; | 287 true_block_data->current_control = merge_true; |
286 false_block_data->current_control = merge_false; | 288 false_block_data->current_control = merge_false; |
287 } | 289 } |
288 branch->Kill(); | 290 branch->Kill(); |
289 cond->Kill(); | 291 cond->Kill(); |
290 merge->Kill(); | 292 merge->Kill(); |
(...skipping 1717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2008 isolate(), graph()->zone(), callable.descriptor(), 0, flags, | 2010 isolate(), graph()->zone(), callable.descriptor(), 0, flags, |
2009 Operator::kNoThrow); | 2011 Operator::kNoThrow); |
2010 to_number_operator_.set(common()->Call(desc)); | 2012 to_number_operator_.set(common()->Call(desc)); |
2011 } | 2013 } |
2012 return to_number_operator_.get(); | 2014 return to_number_operator_.get(); |
2013 } | 2015 } |
2014 | 2016 |
2015 } // namespace compiler | 2017 } // namespace compiler |
2016 } // namespace internal | 2018 } // namespace internal |
2017 } // namespace v8 | 2019 } // namespace v8 |
OLD | NEW |