| 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/raw-machine-assembler.h" | 5 #include "src/compiler/raw-machine-assembler.h" |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
| 9 #include "src/compiler/pipeline.h" | 9 #include "src/compiler/pipeline.h" |
| 10 #include "src/compiler/scheduler.h" | 10 #include "src/compiler/scheduler.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 schedule_ = nullptr; | 45 schedule_ = nullptr; |
| 46 return schedule; | 46 return schedule; |
| 47 } | 47 } |
| 48 | 48 |
| 49 | 49 |
| 50 Node* RawMachineAssembler::Parameter(size_t index) { | 50 Node* RawMachineAssembler::Parameter(size_t index) { |
| 51 DCHECK(index < parameter_count()); | 51 DCHECK(index < parameter_count()); |
| 52 return parameters_[index]; | 52 return parameters_[index]; |
| 53 } | 53 } |
| 54 | 54 |
| 55 void RawMachineAssembler::Fallthrough(RawMachineLabel* label) { |
| 56 DCHECK(current_block_ != schedule()->end()); |
| 57 RawMachineLabel fallthrough; |
| 58 |
| 59 // This Goto dance ensures we remain in split-edge form. |
| 60 Goto(&fallthrough); |
| 61 Bind(label); |
| 62 Goto(&fallthrough); |
| 63 Bind(&fallthrough); |
| 64 } |
| 55 | 65 |
| 56 void RawMachineAssembler::Goto(RawMachineLabel* label) { | 66 void RawMachineAssembler::Goto(RawMachineLabel* label) { |
| 57 DCHECK(current_block_ != schedule()->end()); | 67 DCHECK(current_block_ != schedule()->end()); |
| 58 schedule()->AddGoto(CurrentBlock(), Use(label)); | 68 schedule()->AddGoto(CurrentBlock(), Use(label)); |
| 59 current_block_ = nullptr; | 69 current_block_ = nullptr; |
| 60 } | 70 } |
| 61 | 71 |
| 62 | 72 |
| 63 void RawMachineAssembler::Branch(Node* condition, RawMachineLabel* true_val, | 73 void RawMachineAssembler::Branch(Node* condition, RawMachineLabel* true_val, |
| 64 RawMachineLabel* false_val) { | 74 RawMachineLabel* false_val) { |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 | 472 |
| 463 RawMachineLabel::RawMachineLabel() | 473 RawMachineLabel::RawMachineLabel() |
| 464 : block_(nullptr), used_(false), bound_(false) {} | 474 : block_(nullptr), used_(false), bound_(false) {} |
| 465 | 475 |
| 466 | 476 |
| 467 RawMachineLabel::~RawMachineLabel() { DCHECK(bound_ || !used_); } | 477 RawMachineLabel::~RawMachineLabel() { DCHECK(bound_ || !used_); } |
| 468 | 478 |
| 469 } // namespace compiler | 479 } // namespace compiler |
| 470 } // namespace internal | 480 } // namespace internal |
| 471 } // namespace v8 | 481 } // namespace v8 |
| OLD | NEW |