OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/schedule.h" | 5 #include "src/compiler/schedule.h" |
6 | 6 |
7 #include "src/compiler/node.h" | 7 #include "src/compiler/node.h" |
8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
9 #include "src/ostreams.h" | 9 #include "src/ostreams.h" |
10 | 10 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 case BasicBlock::kGoto: | 101 case BasicBlock::kGoto: |
102 return os << "goto"; | 102 return os << "goto"; |
103 case BasicBlock::kCall: | 103 case BasicBlock::kCall: |
104 return os << "call"; | 104 return os << "call"; |
105 case BasicBlock::kBranch: | 105 case BasicBlock::kBranch: |
106 return os << "branch"; | 106 return os << "branch"; |
107 case BasicBlock::kSwitch: | 107 case BasicBlock::kSwitch: |
108 return os << "switch"; | 108 return os << "switch"; |
109 case BasicBlock::kDeoptimize: | 109 case BasicBlock::kDeoptimize: |
110 return os << "deoptimize"; | 110 return os << "deoptimize"; |
| 111 case BasicBlock::kTailCall: |
| 112 return os << "tailcall"; |
111 case BasicBlock::kReturn: | 113 case BasicBlock::kReturn: |
112 return os << "return"; | 114 return os << "return"; |
113 case BasicBlock::kThrow: | 115 case BasicBlock::kThrow: |
114 return os << "throw"; | 116 return os << "throw"; |
115 } | 117 } |
116 UNREACHABLE(); | 118 UNREACHABLE(); |
117 return os; | 119 return os; |
118 } | 120 } |
119 | 121 |
120 | 122 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 DCHECK_EQ(BasicBlock::kNone, block->control()); | 228 DCHECK_EQ(BasicBlock::kNone, block->control()); |
227 DCHECK_EQ(IrOpcode::kSwitch, sw->opcode()); | 229 DCHECK_EQ(IrOpcode::kSwitch, sw->opcode()); |
228 block->set_control(BasicBlock::kSwitch); | 230 block->set_control(BasicBlock::kSwitch); |
229 for (size_t index = 0; index < succ_count; ++index) { | 231 for (size_t index = 0; index < succ_count; ++index) { |
230 AddSuccessor(block, succ_blocks[index]); | 232 AddSuccessor(block, succ_blocks[index]); |
231 } | 233 } |
232 SetControlInput(block, sw); | 234 SetControlInput(block, sw); |
233 } | 235 } |
234 | 236 |
235 | 237 |
| 238 void Schedule::AddTailCall(BasicBlock* block, Node* input) { |
| 239 DCHECK_EQ(BasicBlock::kNone, block->control()); |
| 240 block->set_control(BasicBlock::kTailCall); |
| 241 SetControlInput(block, input); |
| 242 if (block != end()) AddSuccessor(block, end()); |
| 243 } |
| 244 |
| 245 |
236 void Schedule::AddReturn(BasicBlock* block, Node* input) { | 246 void Schedule::AddReturn(BasicBlock* block, Node* input) { |
237 DCHECK_EQ(BasicBlock::kNone, block->control()); | 247 DCHECK_EQ(BasicBlock::kNone, block->control()); |
238 block->set_control(BasicBlock::kReturn); | 248 block->set_control(BasicBlock::kReturn); |
239 SetControlInput(block, input); | 249 SetControlInput(block, input); |
240 if (block != end()) AddSuccessor(block, end()); | 250 if (block != end()) AddSuccessor(block, end()); |
241 } | 251 } |
242 | 252 |
243 | 253 |
244 void Schedule::AddDeoptimize(BasicBlock* block, Node* input) { | 254 void Schedule::AddDeoptimize(BasicBlock* block, Node* input) { |
245 DCHECK_EQ(BasicBlock::kNone, block->control()); | 255 DCHECK_EQ(BasicBlock::kNone, block->control()); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 } | 374 } |
365 os << "\n"; | 375 os << "\n"; |
366 } | 376 } |
367 } | 377 } |
368 return os; | 378 return os; |
369 } | 379 } |
370 | 380 |
371 } // namespace compiler | 381 } // namespace compiler |
372 } // namespace internal | 382 } // namespace internal |
373 } // namespace v8 | 383 } // namespace v8 |
OLD | NEW |