| 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/pipeline.h" | 5 #include "src/compiler/pipeline.h" |
| 6 #include "src/compiler/raw-machine-assembler.h" | 6 #include "src/compiler/raw-machine-assembler.h" |
| 7 #include "src/compiler/scheduler.h" | 7 #include "src/compiler/scheduler.h" |
| 8 | 8 |
| 9 namespace v8 { | 9 namespace v8 { |
| 10 namespace internal { | 10 namespace internal { |
| 11 namespace compiler { | 11 namespace compiler { |
| 12 | 12 |
| 13 RawMachineAssembler::RawMachineAssembler(Graph* graph, | 13 RawMachineAssembler::RawMachineAssembler(Graph* graph, |
| 14 MachineSignature* machine_sig, | 14 MachineSignature* machine_sig, |
| 15 MachineType word) | 15 MachineType word) |
| 16 : GraphBuilder(graph), | 16 : GraphBuilder(graph), |
| 17 schedule_(new (zone()) Schedule(zone())), | 17 schedule_(new (zone()) Schedule(zone())), |
| 18 machine_(zone(), word), | 18 machine_(word), |
| 19 common_(zone()), | 19 common_(zone()), |
| 20 machine_sig_(machine_sig), | 20 machine_sig_(machine_sig), |
| 21 call_descriptor_( | 21 call_descriptor_( |
| 22 Linkage::GetSimplifiedCDescriptor(graph->zone(), machine_sig)), | 22 Linkage::GetSimplifiedCDescriptor(graph->zone(), machine_sig)), |
| 23 parameters_(NULL), | 23 parameters_(NULL), |
| 24 exit_label_(schedule()->end()), | 24 exit_label_(schedule()->end()), |
| 25 current_block_(schedule()->start()) { | 25 current_block_(schedule()->start()) { |
| 26 int param_count = static_cast<int>(parameter_count()); | 26 int param_count = static_cast<int>(parameter_count()); |
| 27 Node* s = graph->NewNode(common_.Start(param_count)); | 27 Node* s = graph->NewNode(common_.Start(param_count)); |
| 28 graph->SetStart(s); | 28 graph->SetStart(s); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 Node* node = graph()->NewNode(op, input_count, inputs); | 156 Node* node = graph()->NewNode(op, input_count, inputs); |
| 157 BasicBlock* block = op->opcode() == IrOpcode::kParameter ? schedule()->start() | 157 BasicBlock* block = op->opcode() == IrOpcode::kParameter ? schedule()->start() |
| 158 : CurrentBlock(); | 158 : CurrentBlock(); |
| 159 schedule()->AddNode(block, node); | 159 schedule()->AddNode(block, node); |
| 160 return node; | 160 return node; |
| 161 } | 161 } |
| 162 | 162 |
| 163 } // namespace compiler | 163 } // namespace compiler |
| 164 } // namespace internal | 164 } // namespace internal |
| 165 } // namespace v8 | 165 } // namespace v8 |
| OLD | NEW |