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/code-factory.h" | 5 #include "src/code-factory.h" |
6 #include "src/compiler/pipeline.h" | 6 #include "src/compiler/pipeline.h" |
7 #include "src/compiler/raw-machine-assembler.h" | 7 #include "src/compiler/raw-machine-assembler.h" |
8 #include "src/compiler/scheduler.h" | 8 #include "src/compiler/scheduler.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 21 matching lines...) Expand all Loading... |
32 for (size_t i = 0; i < parameter_count(); ++i) { | 32 for (size_t i = 0; i < parameter_count(); ++i) { |
33 parameters_[i] = | 33 parameters_[i] = |
34 NewNode(common()->Parameter(static_cast<int>(i)), graph->start()); | 34 NewNode(common()->Parameter(static_cast<int>(i)), graph->start()); |
35 } | 35 } |
36 } | 36 } |
37 | 37 |
38 | 38 |
39 Schedule* RawMachineAssembler::Export() { | 39 Schedule* RawMachineAssembler::Export() { |
40 // Compute the correct codegen order. | 40 // Compute the correct codegen order. |
41 DCHECK(schedule_->rpo_order()->empty()); | 41 DCHECK(schedule_->rpo_order()->empty()); |
42 Scheduler::ComputeSpecialRPO(schedule_); | 42 ZonePool zone_pool(isolate()); |
| 43 Scheduler::ComputeSpecialRPO(&zone_pool, schedule_); |
43 // Invalidate MachineAssembler. | 44 // Invalidate MachineAssembler. |
44 Schedule* schedule = schedule_; | 45 Schedule* schedule = schedule_; |
45 schedule_ = NULL; | 46 schedule_ = NULL; |
46 return schedule; | 47 return schedule; |
47 } | 48 } |
48 | 49 |
49 | 50 |
50 Node* RawMachineAssembler::Parameter(size_t index) { | 51 Node* RawMachineAssembler::Parameter(size_t index) { |
51 DCHECK(index < parameter_count()); | 52 DCHECK(index < parameter_count()); |
52 return parameters_[index]; | 53 return parameters_[index]; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 Node* node = graph()->NewNode(op, input_count, inputs); | 157 Node* node = graph()->NewNode(op, input_count, inputs); |
157 BasicBlock* block = op->opcode() == IrOpcode::kParameter ? schedule()->start() | 158 BasicBlock* block = op->opcode() == IrOpcode::kParameter ? schedule()->start() |
158 : CurrentBlock(); | 159 : CurrentBlock(); |
159 schedule()->AddNode(block, node); | 160 schedule()->AddNode(block, node); |
160 return node; | 161 return node; |
161 } | 162 } |
162 | 163 |
163 } // namespace compiler | 164 } // namespace compiler |
164 } // namespace internal | 165 } // namespace internal |
165 } // namespace v8 | 166 } // namespace v8 |
OLD | NEW |