| 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 #ifndef V8_CCTEST_COMPILER_GRAPH_BUILDER_TESTER_H_ | 5 #ifndef V8_CCTEST_COMPILER_GRAPH_BUILDER_TESTER_H_ |
| 6 #define V8_CCTEST_COMPILER_GRAPH_BUILDER_TESTER_H_ | 6 #define V8_CCTEST_COMPILER_GRAPH_BUILDER_TESTER_H_ |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 #include "test/cctest/cctest.h" | 9 #include "test/cctest/cctest.h" |
| 10 | 10 |
| 11 #include "src/compiler/common-operator.h" | 11 #include "src/compiler/common-operator.h" |
| 12 #include "src/compiler/instruction-selector.h" |
| 12 #include "src/compiler/linkage.h" | 13 #include "src/compiler/linkage.h" |
| 13 #include "src/compiler/machine-operator.h" | 14 #include "src/compiler/machine-operator.h" |
| 14 #include "src/compiler/operator-properties.h" | 15 #include "src/compiler/operator-properties.h" |
| 15 #include "src/compiler/pipeline.h" | 16 #include "src/compiler/pipeline.h" |
| 16 #include "src/compiler/simplified-operator.h" | 17 #include "src/compiler/simplified-operator.h" |
| 17 #include "test/cctest/compiler/call-tester.h" | 18 #include "test/cctest/compiler/call-tester.h" |
| 18 | 19 |
| 19 namespace v8 { | 20 namespace v8 { |
| 20 namespace internal { | 21 namespace internal { |
| 21 namespace compiler { | 22 namespace compiler { |
| 22 | 23 |
| 23 class GraphAndBuilders { | 24 class GraphAndBuilders { |
| 24 public: | 25 public: |
| 25 explicit GraphAndBuilders(Zone* zone) | 26 explicit GraphAndBuilders(Zone* zone) |
| 26 : main_graph_(new (zone) Graph(zone)), | 27 : main_graph_(new (zone) Graph(zone)), |
| 27 main_common_(zone), | 28 main_common_(zone), |
| 28 main_machine_(zone), | 29 main_machine_(zone, kMachPtr, |
| 30 InstructionSelector::SupportedMachineOperatorFlags()), |
| 29 main_simplified_(zone) {} | 31 main_simplified_(zone) {} |
| 30 | 32 |
| 31 Graph* graph() const { return main_graph_; } | 33 Graph* graph() const { return main_graph_; } |
| 32 Zone* zone() const { return graph()->zone(); } | 34 Zone* zone() const { return graph()->zone(); } |
| 33 CommonOperatorBuilder* common() { return &main_common_; } | 35 CommonOperatorBuilder* common() { return &main_common_; } |
| 34 MachineOperatorBuilder* machine() { return &main_machine_; } | 36 MachineOperatorBuilder* machine() { return &main_machine_; } |
| 35 SimplifiedOperatorBuilder* simplified() { return &main_simplified_; } | 37 SimplifiedOperatorBuilder* simplified() { return &main_simplified_; } |
| 36 | 38 |
| 37 protected: | 39 protected: |
| 38 // Prefixed with main_ to avoid naming conflicts. | 40 // Prefixed with main_ to avoid naming conflicts. |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 Node* return_; | 300 Node* return_; |
| 299 Node** parameters_; | 301 Node** parameters_; |
| 300 MaybeHandle<Code> code_; | 302 MaybeHandle<Code> code_; |
| 301 }; | 303 }; |
| 302 | 304 |
| 303 } // namespace compiler | 305 } // namespace compiler |
| 304 } // namespace internal | 306 } // namespace internal |
| 305 } // namespace v8 | 307 } // namespace v8 |
| 306 | 308 |
| 307 #endif // V8_CCTEST_COMPILER_GRAPH_BUILDER_TESTER_H_ | 309 #endif // V8_CCTEST_COMPILER_GRAPH_BUILDER_TESTER_H_ |
| OLD | NEW |