| 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_AST_GRAPH_BUILDER_H_ | 5 #ifndef V8_COMPILER_AST_GRAPH_BUILDER_H_ |
| 6 #define V8_COMPILER_AST_GRAPH_BUILDER_H_ | 6 #define V8_COMPILER_AST_GRAPH_BUILDER_H_ |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/ast.h" | 10 #include "src/ast.h" |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 | 323 |
| 324 protected: | 324 protected: |
| 325 AstContext(AstGraphBuilder* owner, Expression::Context kind); | 325 AstContext(AstGraphBuilder* owner, Expression::Context kind); |
| 326 virtual ~AstContext(); | 326 virtual ~AstContext(); |
| 327 | 327 |
| 328 AstGraphBuilder* owner() const { return owner_; } | 328 AstGraphBuilder* owner() const { return owner_; } |
| 329 Environment* environment() const { return owner_->environment(); } | 329 Environment* environment() const { return owner_->environment(); } |
| 330 | 330 |
| 331 // We want to be able to assert, in a context-specific way, that the stack | 331 // We want to be able to assert, in a context-specific way, that the stack |
| 332 // height makes sense when the context is filled. | 332 // height makes sense when the context is filled. |
| 333 #ifdef DEBUG | 333 #if DCHECK_IS_ON |
| 334 int original_height_; | 334 int original_height_; |
| 335 #endif | 335 #endif |
| 336 | 336 |
| 337 private: | 337 private: |
| 338 Expression::Context kind_; | 338 Expression::Context kind_; |
| 339 AstGraphBuilder* owner_; | 339 AstGraphBuilder* owner_; |
| 340 AstContext* outer_; | 340 AstContext* outer_; |
| 341 }; | 341 }; |
| 342 | 342 |
| 343 | 343 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 | 441 |
| 442 Scope* AstGraphBuilder::current_scope() const { | 442 Scope* AstGraphBuilder::current_scope() const { |
| 443 return execution_context_->scope(); | 443 return execution_context_->scope(); |
| 444 } | 444 } |
| 445 | 445 |
| 446 } // namespace compiler | 446 } // namespace compiler |
| 447 } // namespace internal | 447 } // namespace internal |
| 448 } // namespace v8 | 448 } // namespace v8 |
| 449 | 449 |
| 450 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ | 450 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ |
| OLD | NEW |