| 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_SIMPLIFIED_GRAPH_BUILDER_H_ | 5 #ifndef V8_CCTEST_COMPILER_SIMPLIFIED_GRAPH_BUILDER_H_ |
| 6 #define V8_CCTEST_COMPILER_SIMPLIFIED_GRAPH_BUILDER_H_ | 6 #define V8_CCTEST_COMPILER_SIMPLIFIED_GRAPH_BUILDER_H_ |
| 7 | 7 |
| 8 #include "src/compiler/common-operator.h" | 8 #include "src/compiler/common-operator.h" |
| 9 #include "src/compiler/graph-builder.h" | 9 #include "src/compiler/graph-builder.h" |
| 10 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
| 11 #include "src/compiler/simplified-operator.h" | 11 #include "src/compiler/simplified-operator.h" |
| 12 #include "test/cctest/cctest.h" | 12 #include "test/cctest/cctest.h" |
| 13 #include "test/cctest/compiler/call-tester.h" | 13 #include "test/cctest/compiler/call-tester.h" |
| 14 | 14 |
| 15 namespace v8 { | 15 namespace v8 { |
| 16 namespace internal { | 16 namespace internal { |
| 17 namespace compiler { | 17 namespace compiler { |
| 18 | 18 |
| 19 class SimplifiedGraphBuilder : public GraphBuilder { | 19 class SimplifiedGraphBuilder : public GraphBuilder { |
| 20 public: | 20 public: |
| 21 SimplifiedGraphBuilder(Graph* graph, CommonOperatorBuilder* common, | 21 SimplifiedGraphBuilder(Isolate* isolate, Graph* graph, |
| 22 CommonOperatorBuilder* common, |
| 22 MachineOperatorBuilder* machine, | 23 MachineOperatorBuilder* machine, |
| 23 SimplifiedOperatorBuilder* simplified); | 24 SimplifiedOperatorBuilder* simplified); |
| 24 virtual ~SimplifiedGraphBuilder() {} | 25 virtual ~SimplifiedGraphBuilder() {} |
| 25 | 26 |
| 26 Zone* zone() const { return graph()->zone(); } | 27 Zone* zone() const { return graph()->zone(); } |
| 27 Isolate* isolate() const { return zone()->isolate(); } | |
| 28 CommonOperatorBuilder* common() const { return common_; } | 28 CommonOperatorBuilder* common() const { return common_; } |
| 29 MachineOperatorBuilder* machine() const { return machine_; } | 29 MachineOperatorBuilder* machine() const { return machine_; } |
| 30 SimplifiedOperatorBuilder* simplified() const { return simplified_; } | 30 SimplifiedOperatorBuilder* simplified() const { return simplified_; } |
| 31 | 31 |
| 32 // Initialize graph and builder. | 32 // Initialize graph and builder. |
| 33 void Begin(int num_parameters); | 33 void Begin(int num_parameters); |
| 34 | 34 |
| 35 void Return(Node* value); | 35 void Return(Node* value); |
| 36 | 36 |
| 37 // Close the graph. | 37 // Close the graph. |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 CommonOperatorBuilder* common_; | 145 CommonOperatorBuilder* common_; |
| 146 MachineOperatorBuilder* machine_; | 146 MachineOperatorBuilder* machine_; |
| 147 SimplifiedOperatorBuilder* simplified_; | 147 SimplifiedOperatorBuilder* simplified_; |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 } // namespace compiler | 150 } // namespace compiler |
| 151 } // namespace internal | 151 } // namespace internal |
| 152 } // namespace v8 | 152 } // namespace v8 |
| 153 | 153 |
| 154 #endif // V8_CCTEST_COMPILER_SIMPLIFIED_GRAPH_BUILDER_H_ | 154 #endif // V8_CCTEST_COMPILER_SIMPLIFIED_GRAPH_BUILDER_H_ |
| OLD | NEW |