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/scheduler.h" | 5 #include "src/compiler/scheduler.h" |
6 | 6 |
7 #include <iomanip> | 7 #include <iomanip> |
8 | 8 |
9 #include "src/base/adapters.h" | 9 #include "src/base/adapters.h" |
10 #include "src/bit-vector.h" | 10 #include "src/bit-vector.h" |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 // Put Terminate in the loop to which it refers. | 317 // Put Terminate in the loop to which it refers. |
318 Node* loop = NodeProperties::GetControlInput(node); | 318 Node* loop = NodeProperties::GetControlInput(node); |
319 BasicBlock* block = BuildBlockForNode(loop); | 319 BasicBlock* block = BuildBlockForNode(loop); |
320 FixNode(block, node); | 320 FixNode(block, node); |
321 break; | 321 break; |
322 } | 322 } |
323 case IrOpcode::kBranch: | 323 case IrOpcode::kBranch: |
324 case IrOpcode::kSwitch: | 324 case IrOpcode::kSwitch: |
325 BuildBlocksForSuccessors(node); | 325 BuildBlocksForSuccessors(node); |
326 break; | 326 break; |
| 327 #define BUILD_BLOCK_JS_CASE(Name) case IrOpcode::k##Name: |
| 328 JS_OP_LIST(BUILD_BLOCK_JS_CASE) |
| 329 // JS opcodes are just like calls => fall through. |
| 330 #undef BUILD_BLOCK_JS_CASE |
327 case IrOpcode::kCall: | 331 case IrOpcode::kCall: |
328 if (NodeProperties::IsExceptionalCall(node)) { | 332 if (NodeProperties::IsExceptionalCall(node)) { |
329 BuildBlocksForSuccessors(node); | 333 BuildBlocksForSuccessors(node); |
330 } | 334 } |
331 break; | 335 break; |
332 default: | 336 default: |
333 break; | 337 break; |
334 } | 338 } |
335 } | 339 } |
336 | 340 |
(...skipping 20 matching lines...) Expand all Loading... |
357 ConnectTailCall(node); | 361 ConnectTailCall(node); |
358 break; | 362 break; |
359 case IrOpcode::kReturn: | 363 case IrOpcode::kReturn: |
360 scheduler_->UpdatePlacement(node, Scheduler::kFixed); | 364 scheduler_->UpdatePlacement(node, Scheduler::kFixed); |
361 ConnectReturn(node); | 365 ConnectReturn(node); |
362 break; | 366 break; |
363 case IrOpcode::kThrow: | 367 case IrOpcode::kThrow: |
364 scheduler_->UpdatePlacement(node, Scheduler::kFixed); | 368 scheduler_->UpdatePlacement(node, Scheduler::kFixed); |
365 ConnectThrow(node); | 369 ConnectThrow(node); |
366 break; | 370 break; |
| 371 #define CONNECT_BLOCK_JS_CASE(Name) case IrOpcode::k##Name: |
| 372 JS_OP_LIST(CONNECT_BLOCK_JS_CASE) |
| 373 // JS opcodes are just like calls => fall through. |
| 374 #undef CONNECT_BLOCK_JS_CASE |
367 case IrOpcode::kCall: | 375 case IrOpcode::kCall: |
368 if (NodeProperties::IsExceptionalCall(node)) { | 376 if (NodeProperties::IsExceptionalCall(node)) { |
369 scheduler_->UpdatePlacement(node, Scheduler::kFixed); | 377 scheduler_->UpdatePlacement(node, Scheduler::kFixed); |
370 ConnectCall(node); | 378 ConnectCall(node); |
371 } | 379 } |
372 break; | 380 break; |
373 default: | 381 default: |
374 break; | 382 break; |
375 } | 383 } |
376 } | 384 } |
(...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1737 for (Node* const node : *nodes) { | 1745 for (Node* const node : *nodes) { |
1738 schedule_->SetBlockForNode(to, node); | 1746 schedule_->SetBlockForNode(to, node); |
1739 scheduled_nodes_[to->id().ToSize()].push_back(node); | 1747 scheduled_nodes_[to->id().ToSize()].push_back(node); |
1740 } | 1748 } |
1741 nodes->clear(); | 1749 nodes->clear(); |
1742 } | 1750 } |
1743 | 1751 |
1744 } // namespace compiler | 1752 } // namespace compiler |
1745 } // namespace internal | 1753 } // namespace internal |
1746 } // namespace v8 | 1754 } // namespace v8 |
OLD | NEW |