| 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/v8.h" | 5 #include "src/v8.h" |
| 6 #include "test/cctest/cctest.h" | 6 #include "test/cctest/cctest.h" |
| 7 | 7 |
| 8 #include "src/compiler/code-generator.h" | 8 #include "src/compiler/code-generator.h" |
| 9 #include "src/compiler/common-operator.h" | 9 #include "src/compiler/common-operator.h" |
| 10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 void allocCode() { | 44 void allocCode() { |
| 45 if (schedule.rpo_order()->size() == 0) { | 45 if (schedule.rpo_order()->size() == 0) { |
| 46 // Compute the RPO order. | 46 // Compute the RPO order. |
| 47 Scheduler::ComputeSpecialRPO(main_zone(), &schedule); | 47 Scheduler::ComputeSpecialRPO(main_zone(), &schedule); |
| 48 DCHECK(schedule.rpo_order()->size() > 0); | 48 DCHECK(schedule.rpo_order()->size() > 0); |
| 49 } | 49 } |
| 50 InstructionBlocks* instruction_blocks = | 50 InstructionBlocks* instruction_blocks = |
| 51 TestInstrSeq::InstructionBlocksFor(main_zone(), &schedule); | 51 TestInstrSeq::InstructionBlocksFor(main_zone(), &schedule); |
| 52 code = new (main_zone()) | 52 code = new (main_zone()) |
| 53 TestInstrSeq(main_isolate(), main_zone(), instruction_blocks); | 53 TestInstrSeq(main_isolate(), main_zone(), instruction_blocks, nullptr); |
| 54 } | 54 } |
| 55 | 55 |
| 56 Node* Int32Constant(int32_t val) { | 56 Node* Int32Constant(int32_t val) { |
| 57 Node* node = graph.NewNode(common.Int32Constant(val)); | 57 Node* node = graph.NewNode(common.Int32Constant(val)); |
| 58 schedule.AddNode(schedule.start(), node); | 58 schedule.AddNode(schedule.start(), node); |
| 59 return node; | 59 return node; |
| 60 } | 60 } |
| 61 | 61 |
| 62 Node* Float64Constant(double val) { | 62 Node* Float64Constant(double val) { |
| 63 Node* node = graph.NewNode(common.Float64Constant(val)); | 63 Node* node = graph.NewNode(common.Float64Constant(val)); |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 CHECK(inputs[z].Equals(*m->InputAt(z))); | 315 CHECK(inputs[z].Equals(*m->InputAt(z))); |
| 316 } | 316 } |
| 317 | 317 |
| 318 for (size_t z = 0; z < k; z++) { | 318 for (size_t z = 0; z < k; z++) { |
| 319 CHECK(temps[z].Equals(*m->TempAt(z))); | 319 CHECK(temps[z].Equals(*m->TempAt(z))); |
| 320 } | 320 } |
| 321 } | 321 } |
| 322 } | 322 } |
| 323 } | 323 } |
| 324 } | 324 } |
| OLD | NEW |