| 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/ast/ast.h" | 8 #include "src/ast/ast.h" |
| 9 #include "src/compiler/compiler-source-position-table.h" | 9 #include "src/compiler/compiler-source-position-table.h" |
| 10 #include "src/compiler/js-graph.h" | 10 #include "src/compiler/js-graph.h" |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 | 357 |
| 358 // =========================================================================== | 358 // =========================================================================== |
| 359 // The following visitation methods all recursively visit a subtree of the | 359 // The following visitation methods all recursively visit a subtree of the |
| 360 // underlying AST and extent the graph. The operand stack is mutated in a way | 360 // underlying AST and extent the graph. The operand stack is mutated in a way |
| 361 // consistent with other compilers: | 361 // consistent with other compilers: |
| 362 // - Expressions pop operands and push result, depending on {AstContext}. | 362 // - Expressions pop operands and push result, depending on {AstContext}. |
| 363 // - Statements keep the operand stack balanced. | 363 // - Statements keep the operand stack balanced. |
| 364 | 364 |
| 365 // Visit statements. | 365 // Visit statements. |
| 366 void VisitIfNotNull(Statement* stmt); | 366 void VisitIfNotNull(Statement* stmt); |
| 367 void VisitInScope(Statement* stmt, Scope* scope, Node* context); | |
| 368 | 367 |
| 369 // Visit expressions. | 368 // Visit expressions. |
| 370 void Visit(Expression* expr); | 369 void Visit(Expression* expr); |
| 371 void VisitForTest(Expression* expr); | 370 void VisitForTest(Expression* expr); |
| 372 void VisitForEffect(Expression* expr); | 371 void VisitForEffect(Expression* expr); |
| 373 void VisitForValue(Expression* expr); | 372 void VisitForValue(Expression* expr); |
| 374 void VisitForValueOrNull(Expression* expr); | 373 void VisitForValueOrNull(Expression* expr); |
| 375 void VisitForValueOrTheHole(Expression* expr); | 374 void VisitForValueOrTheHole(Expression* expr); |
| 376 void VisitForValues(ZoneList<Expression*>* exprs); | 375 void VisitForValues(ZoneList<Expression*>* exprs); |
| 377 | 376 |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 private: | 598 private: |
| 600 SourcePositionTable* const source_positions_; | 599 SourcePositionTable* const source_positions_; |
| 601 SourcePosition const start_position_; | 600 SourcePosition const start_position_; |
| 602 }; | 601 }; |
| 603 | 602 |
| 604 } // namespace compiler | 603 } // namespace compiler |
| 605 } // namespace internal | 604 } // namespace internal |
| 606 } // namespace v8 | 605 } // namespace v8 |
| 607 | 606 |
| 608 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ | 607 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ |
| OLD | NEW |