| 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_COMPILER_JS_GRAPH_H_ | 5 #ifndef V8_COMPILER_JS_GRAPH_H_ |
| 6 #define V8_COMPILER_JS_GRAPH_H_ | 6 #define V8_COMPILER_JS_GRAPH_H_ |
| 7 | 7 |
| 8 #include "src/compiler/common-node-cache.h" | 8 #include "src/compiler/common-node-cache.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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // Creates a dummy Constant node, used to satisfy calling conventions of | 108 // Creates a dummy Constant node, used to satisfy calling conventions of |
| 109 // stubs and runtime functions that do not require a context. | 109 // stubs and runtime functions that do not require a context. |
| 110 Node* NoContextConstant() { return ZeroConstant(); } | 110 Node* NoContextConstant() { return ZeroConstant(); } |
| 111 | 111 |
| 112 JSOperatorBuilder* javascript() { return javascript_; } | 112 JSOperatorBuilder* javascript() { return javascript_; } |
| 113 CommonOperatorBuilder* common() { return common_; } | 113 CommonOperatorBuilder* common() { return common_; } |
| 114 MachineOperatorBuilder* machine() { return machine_; } | 114 MachineOperatorBuilder* machine() { return machine_; } |
| 115 Graph* graph() { return graph_; } | 115 Graph* graph() { return graph_; } |
| 116 Zone* zone() { return graph()->zone(); } | 116 Zone* zone() { return graph()->zone(); } |
| 117 Isolate* isolate() { return zone()->isolate(); } | 117 Isolate* isolate() { return zone()->isolate(); } |
| 118 Factory* factory() { return isolate()->factory(); } |
| 118 | 119 |
| 119 void GetCachedNodes(NodeVector* nodes); | 120 void GetCachedNodes(NodeVector* nodes); |
| 120 | 121 |
| 121 private: | 122 private: |
| 122 Graph* graph_; | 123 Graph* graph_; |
| 123 CommonOperatorBuilder* common_; | 124 CommonOperatorBuilder* common_; |
| 124 JSOperatorBuilder* javascript_; | 125 JSOperatorBuilder* javascript_; |
| 125 MachineOperatorBuilder* machine_; | 126 MachineOperatorBuilder* machine_; |
| 126 | 127 |
| 127 // TODO(titzer): make this into a simple array. | 128 // TODO(titzer): make this into a simple array. |
| 128 SetOncePointer<Node> c_entry_stub_constant_; | 129 SetOncePointer<Node> c_entry_stub_constant_; |
| 129 SetOncePointer<Node> undefined_constant_; | 130 SetOncePointer<Node> undefined_constant_; |
| 130 SetOncePointer<Node> the_hole_constant_; | 131 SetOncePointer<Node> the_hole_constant_; |
| 131 SetOncePointer<Node> true_constant_; | 132 SetOncePointer<Node> true_constant_; |
| 132 SetOncePointer<Node> false_constant_; | 133 SetOncePointer<Node> false_constant_; |
| 133 SetOncePointer<Node> null_constant_; | 134 SetOncePointer<Node> null_constant_; |
| 134 SetOncePointer<Node> zero_constant_; | 135 SetOncePointer<Node> zero_constant_; |
| 135 SetOncePointer<Node> one_constant_; | 136 SetOncePointer<Node> one_constant_; |
| 136 SetOncePointer<Node> nan_constant_; | 137 SetOncePointer<Node> nan_constant_; |
| 137 | 138 |
| 138 CommonNodeCache cache_; | 139 CommonNodeCache cache_; |
| 139 | 140 |
| 140 Node* ImmovableHeapConstant(Handle<HeapObject> value); | 141 Node* ImmovableHeapConstant(Handle<HeapObject> value); |
| 141 Node* NumberConstant(double value); | 142 Node* NumberConstant(double value); |
| 142 | 143 |
| 143 Factory* factory() { return isolate()->factory(); } | |
| 144 | |
| 145 DISALLOW_COPY_AND_ASSIGN(JSGraph); | 144 DISALLOW_COPY_AND_ASSIGN(JSGraph); |
| 146 }; | 145 }; |
| 147 | 146 |
| 148 } // namespace compiler | 147 } // namespace compiler |
| 149 } // namespace internal | 148 } // namespace internal |
| 150 } // namespace v8 | 149 } // namespace v8 |
| 151 | 150 |
| 152 #endif | 151 #endif |
| OLD | NEW |