OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_GRAPH_BUILDER_H_ | 5 #ifndef V8_COMPILER_GRAPH_BUILDER_H_ |
6 #define V8_COMPILER_GRAPH_BUILDER_H_ | 6 #define V8_COMPILER_GRAPH_BUILDER_H_ |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 | 228 |
229 Node* GetContext() { return builder_->current_context(); } | 229 Node* GetContext() { return builder_->current_context(); } |
230 | 230 |
231 protected: | 231 protected: |
232 Zone* zone() const { return builder_->local_zone(); } | 232 Zone* zone() const { return builder_->local_zone(); } |
233 Graph* graph() const { return builder_->graph(); } | 233 Graph* graph() const { return builder_->graph(); } |
234 StructuredGraphBuilder* builder() const { return builder_; } | 234 StructuredGraphBuilder* builder() const { return builder_; } |
235 CommonOperatorBuilder* common() { return builder_->common(); } | 235 CommonOperatorBuilder* common() { return builder_->common(); } |
236 NodeVector* values() { return &values_; } | 236 NodeVector* values() { return &values_; } |
237 | 237 |
| 238 // Friends using the values vector. |
| 239 // TODO(mstarzinger): Un-friend once AstGraphBuilder has been merged with |
| 240 // StructuredGraphBuilder. |
| 241 friend class TryCatchBuilder; |
| 242 friend class TryFinallyBuilder; |
| 243 |
238 // Prepare environment to be used as loop header. | 244 // Prepare environment to be used as loop header. |
239 void PrepareForLoop(BitVector* assigned, bool is_osr = false); | 245 void PrepareForLoop(BitVector* assigned, bool is_osr = false); |
240 | 246 |
241 private: | 247 private: |
242 StructuredGraphBuilder* builder_; | 248 StructuredGraphBuilder* builder_; |
243 Node* control_dependency_; | 249 Node* control_dependency_; |
244 Node* effect_dependency_; | 250 Node* effect_dependency_; |
245 NodeVector values_; | 251 NodeVector values_; |
246 }; | 252 }; |
247 } | 253 } |
248 } | 254 } |
249 } // namespace v8::internal::compiler | 255 } // namespace v8::internal::compiler |
250 | 256 |
251 #endif // V8_COMPILER_GRAPH_BUILDER_H__ | 257 #endif // V8_COMPILER_GRAPH_BUILDER_H__ |
OLD | NEW |