| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/instruction-selector.h" | 5 #include "src/compiler/instruction-selector.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "src/base/adapters.h" | 9 #include "src/base/adapters.h" |
| 10 #include "src/compiler/compiler-source-position-table.h" | 10 #include "src/compiler/compiler-source-position-table.h" |
| (...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 900 } | 900 } |
| 901 | 901 |
| 902 | 902 |
| 903 void InstructionSelector::VisitControl(BasicBlock* block) { | 903 void InstructionSelector::VisitControl(BasicBlock* block) { |
| 904 #ifdef DEBUG | 904 #ifdef DEBUG |
| 905 // SSA deconstruction requires targets of branches not to have phis. | 905 // SSA deconstruction requires targets of branches not to have phis. |
| 906 // Edge split form guarantees this property, but is more strict. | 906 // Edge split form guarantees this property, but is more strict. |
| 907 if (block->SuccessorCount() > 1) { | 907 if (block->SuccessorCount() > 1) { |
| 908 for (BasicBlock* const successor : block->successors()) { | 908 for (BasicBlock* const successor : block->successors()) { |
| 909 for (Node* const node : *successor) { | 909 for (Node* const node : *successor) { |
| 910 // If this CHECK fails, you might have specified merged variables |
| 911 // for a label with only one predecessor. |
| 910 CHECK(!IrOpcode::IsPhiOpcode(node->opcode())); | 912 CHECK(!IrOpcode::IsPhiOpcode(node->opcode())); |
| 911 } | 913 } |
| 912 } | 914 } |
| 913 } | 915 } |
| 914 #endif | 916 #endif |
| 915 | 917 |
| 916 Node* input = block->control_input(); | 918 Node* input = block->control_input(); |
| 917 switch (block->control()) { | 919 switch (block->control()) { |
| 918 case BasicBlock::kGoto: | 920 case BasicBlock::kGoto: |
| 919 return VisitGoto(block->SuccessorAt(0)); | 921 return VisitGoto(block->SuccessorAt(0)); |
| (...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2261 return new (instruction_zone()) FrameStateDescriptor( | 2263 return new (instruction_zone()) FrameStateDescriptor( |
| 2262 instruction_zone(), state_info.type(), state_info.bailout_id(), | 2264 instruction_zone(), state_info.type(), state_info.bailout_id(), |
| 2263 state_info.state_combine(), parameters, locals, stack, | 2265 state_info.state_combine(), parameters, locals, stack, |
| 2264 state_info.shared_info(), outer_state); | 2266 state_info.shared_info(), outer_state); |
| 2265 } | 2267 } |
| 2266 | 2268 |
| 2267 | 2269 |
| 2268 } // namespace compiler | 2270 } // namespace compiler |
| 2269 } // namespace internal | 2271 } // namespace internal |
| 2270 } // namespace v8 | 2272 } // namespace v8 |
| OLD | NEW |