| 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 23 matching lines...) Expand all Loading... |
| 34 javascript_(javascript), | 34 javascript_(javascript), |
| 35 simplified_(simplified), | 35 simplified_(simplified), |
| 36 machine_(machine), | 36 machine_(machine), |
| 37 cache_(zone()) { | 37 cache_(zone()) { |
| 38 for (int i = 0; i < kNumCachedNodes; i++) cached_nodes_[i] = nullptr; | 38 for (int i = 0; i < kNumCachedNodes; i++) cached_nodes_[i] = nullptr; |
| 39 } | 39 } |
| 40 | 40 |
| 41 // Canonicalized global constants. | 41 // Canonicalized global constants. |
| 42 Node* CEntryStubConstant(int result_size); | 42 Node* CEntryStubConstant(int result_size); |
| 43 Node* EmptyFixedArrayConstant(); | 43 Node* EmptyFixedArrayConstant(); |
| 44 Node* OptimizedOutConstant(); |
| 44 Node* UndefinedConstant(); | 45 Node* UndefinedConstant(); |
| 45 Node* TheHoleConstant(); | 46 Node* TheHoleConstant(); |
| 46 Node* TrueConstant(); | 47 Node* TrueConstant(); |
| 47 Node* FalseConstant(); | 48 Node* FalseConstant(); |
| 48 Node* NullConstant(); | 49 Node* NullConstant(); |
| 49 Node* ZeroConstant(); | 50 Node* ZeroConstant(); |
| 50 Node* OneConstant(); | 51 Node* OneConstant(); |
| 51 Node* NaNConstant(); | 52 Node* NaNConstant(); |
| 52 | 53 |
| 53 // Creates a HeapConstant node, possibly canonicalized, and may access the | 54 // Creates a HeapConstant node, possibly canonicalized, and may access the |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 Zone* zone() const { return graph()->zone(); } | 130 Zone* zone() const { return graph()->zone(); } |
| 130 Isolate* isolate() const { return isolate_; } | 131 Isolate* isolate() const { return isolate_; } |
| 131 Factory* factory() const { return isolate()->factory(); } | 132 Factory* factory() const { return isolate()->factory(); } |
| 132 | 133 |
| 133 void GetCachedNodes(NodeVector* nodes); | 134 void GetCachedNodes(NodeVector* nodes); |
| 134 | 135 |
| 135 private: | 136 private: |
| 136 enum CachedNode { | 137 enum CachedNode { |
| 137 kCEntryStubConstant, | 138 kCEntryStubConstant, |
| 138 kEmptyFixedArrayConstant, | 139 kEmptyFixedArrayConstant, |
| 140 kOptimizedOutConstant, |
| 139 kUndefinedConstant, | 141 kUndefinedConstant, |
| 140 kTheHoleConstant, | 142 kTheHoleConstant, |
| 141 kTrueConstant, | 143 kTrueConstant, |
| 142 kFalseConstant, | 144 kFalseConstant, |
| 143 kNullConstant, | 145 kNullConstant, |
| 144 kZeroConstant, | 146 kZeroConstant, |
| 145 kOneConstant, | 147 kOneConstant, |
| 146 kNaNConstant, | 148 kNaNConstant, |
| 147 kEmptyFrameState, | 149 kEmptyFrameState, |
| 148 kDead, | 150 kDead, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 161 Node* NumberConstant(double value); | 163 Node* NumberConstant(double value); |
| 162 | 164 |
| 163 DISALLOW_COPY_AND_ASSIGN(JSGraph); | 165 DISALLOW_COPY_AND_ASSIGN(JSGraph); |
| 164 }; | 166 }; |
| 165 | 167 |
| 166 } // namespace compiler | 168 } // namespace compiler |
| 167 } // namespace internal | 169 } // namespace internal |
| 168 } // namespace v8 | 170 } // namespace v8 |
| 169 | 171 |
| 170 #endif | 172 #endif |
| OLD | NEW |