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 14 matching lines...) Expand all Loading... |
25 public: | 25 public: |
26 JSGraph(Graph* graph, CommonOperatorBuilder* common, | 26 JSGraph(Graph* graph, CommonOperatorBuilder* common, |
27 JSOperatorBuilder* javascript, MachineOperatorBuilder* machine) | 27 JSOperatorBuilder* javascript, MachineOperatorBuilder* machine) |
28 : graph_(graph), | 28 : graph_(graph), |
29 common_(common), | 29 common_(common), |
30 javascript_(javascript), | 30 javascript_(javascript), |
31 machine_(machine), | 31 machine_(machine), |
32 cache_(zone()) {} | 32 cache_(zone()) {} |
33 | 33 |
34 // Canonicalized global constants. | 34 // Canonicalized global constants. |
35 Node* CEntryStubConstant(); | |
36 Node* UndefinedConstant(); | 35 Node* UndefinedConstant(); |
37 Node* TheHoleConstant(); | 36 Node* TheHoleConstant(); |
38 Node* TrueConstant(); | 37 Node* TrueConstant(); |
39 Node* FalseConstant(); | 38 Node* FalseConstant(); |
40 Node* NullConstant(); | 39 Node* NullConstant(); |
41 Node* ZeroConstant(); | 40 Node* ZeroConstant(); |
42 Node* OneConstant(); | 41 Node* OneConstant(); |
43 Node* NaNConstant(); | 42 Node* NaNConstant(); |
44 | 43 |
45 // Creates a HeapConstant node, possibly canonicalized, without inspecting the | 44 // Creates a HeapConstant node, possibly canonicalized, without inspecting the |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 109 |
111 void GetCachedNodes(NodeVector* nodes); | 110 void GetCachedNodes(NodeVector* nodes); |
112 | 111 |
113 private: | 112 private: |
114 Graph* graph_; | 113 Graph* graph_; |
115 CommonOperatorBuilder* common_; | 114 CommonOperatorBuilder* common_; |
116 JSOperatorBuilder* javascript_; | 115 JSOperatorBuilder* javascript_; |
117 MachineOperatorBuilder* machine_; | 116 MachineOperatorBuilder* machine_; |
118 | 117 |
119 // TODO(titzer): make this into a simple array. | 118 // TODO(titzer): make this into a simple array. |
120 SetOncePointer<Node> c_entry_stub_constant_; | |
121 SetOncePointer<Node> undefined_constant_; | 119 SetOncePointer<Node> undefined_constant_; |
122 SetOncePointer<Node> the_hole_constant_; | 120 SetOncePointer<Node> the_hole_constant_; |
123 SetOncePointer<Node> true_constant_; | 121 SetOncePointer<Node> true_constant_; |
124 SetOncePointer<Node> false_constant_; | 122 SetOncePointer<Node> false_constant_; |
125 SetOncePointer<Node> null_constant_; | 123 SetOncePointer<Node> null_constant_; |
126 SetOncePointer<Node> zero_constant_; | 124 SetOncePointer<Node> zero_constant_; |
127 SetOncePointer<Node> one_constant_; | 125 SetOncePointer<Node> one_constant_; |
128 SetOncePointer<Node> nan_constant_; | 126 SetOncePointer<Node> nan_constant_; |
129 | 127 |
130 CommonNodeCache cache_; | 128 CommonNodeCache cache_; |
131 | 129 |
132 Node* ImmovableHeapConstant(Handle<HeapObject> value); | 130 Node* ImmovableHeapConstant(Handle<HeapObject> value); |
133 Node* NumberConstant(double value); | 131 Node* NumberConstant(double value); |
134 | 132 |
135 Factory* factory() { return isolate()->factory(); } | 133 Factory* factory() { return isolate()->factory(); } |
136 | 134 |
137 DISALLOW_COPY_AND_ASSIGN(JSGraph); | 135 DISALLOW_COPY_AND_ASSIGN(JSGraph); |
138 }; | 136 }; |
139 | 137 |
140 } // namespace compiler | 138 } // namespace compiler |
141 } // namespace internal | 139 } // namespace internal |
142 } // namespace v8 | 140 } // namespace v8 |
143 | 141 |
144 #endif | 142 #endif |
OLD | NEW |