| 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-node-factory.h" | 10 #include "src/compiler/machine-node-factory.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 Isolate* isolate() const { return zone()->isolate(); } | 44 Isolate* isolate() const { return zone()->isolate(); } |
| 45 Zone* zone() const { return StructuredGraphBuilder::zone(); } | 45 Zone* zone() const { return StructuredGraphBuilder::zone(); } |
| 46 CommonOperatorBuilder* common() const { | 46 CommonOperatorBuilder* common() const { |
| 47 return StructuredGraphBuilder::common(); | 47 return StructuredGraphBuilder::common(); |
| 48 } | 48 } |
| 49 MachineOperatorBuilder* machine() const { return machine_; } | 49 MachineOperatorBuilder* machine() const { return machine_; } |
| 50 SimplifiedOperatorBuilder* simplified() const { return simplified_; } | 50 SimplifiedOperatorBuilder* simplified() const { return simplified_; } |
| 51 Environment* environment() { | 51 Environment* environment() { |
| 52 return reinterpret_cast<Environment*>(environment_internal()); | 52 return reinterpret_cast<Environment*>( |
| 53 StructuredGraphBuilder::environment()); |
| 53 } | 54 } |
| 54 | 55 |
| 55 // Initialize graph and builder. | 56 // Initialize graph and builder. |
| 56 void Begin(int num_parameters); | 57 void Begin(int num_parameters); |
| 57 | 58 |
| 58 void Return(Node* value); | 59 void Return(Node* value); |
| 59 | 60 |
| 60 // Close the graph. | 61 // Close the graph. |
| 61 void End(); | 62 void End(); |
| 62 | 63 |
| 63 private: | 64 private: |
| 64 MachineOperatorBuilder* machine_; | 65 MachineOperatorBuilder* machine_; |
| 65 SimplifiedOperatorBuilder* simplified_; | 66 SimplifiedOperatorBuilder* simplified_; |
| 66 }; | 67 }; |
| 67 | 68 |
| 68 } // namespace compiler | 69 } // namespace compiler |
| 69 } // namespace internal | 70 } // namespace internal |
| 70 } // namespace v8 | 71 } // namespace v8 |
| 71 | 72 |
| 72 #endif // V8_CCTEST_COMPILER_SIMPLIFIED_GRAPH_BUILDER_H_ | 73 #endif // V8_CCTEST_COMPILER_SIMPLIFIED_GRAPH_BUILDER_H_ |
| OLD | NEW |