OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_AST_AST_TRAVERSAL_VISITOR_H_ | 5 #ifndef V8_AST_AST_TRAVERSAL_VISITOR_H_ |
6 #define V8_AST_AST_TRAVERSAL_VISITOR_H_ | 6 #define V8_AST_AST_TRAVERSAL_VISITOR_H_ |
7 | 7 |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
10 | 10 |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 PROCESS_NODE(stmt); | 281 PROCESS_NODE(stmt); |
282 } | 282 } |
283 | 283 |
284 template <class Subclass> | 284 template <class Subclass> |
285 void AstTraversalVisitor<Subclass>::VisitFunctionLiteral( | 285 void AstTraversalVisitor<Subclass>::VisitFunctionLiteral( |
286 FunctionLiteral* expr) { | 286 FunctionLiteral* expr) { |
287 PROCESS_EXPRESSION(expr); | 287 PROCESS_EXPRESSION(expr); |
288 DeclarationScope* scope = expr->scope(); | 288 DeclarationScope* scope = expr->scope(); |
289 RECURSE_EXPRESSION(VisitDeclarations(scope->declarations())); | 289 RECURSE_EXPRESSION(VisitDeclarations(scope->declarations())); |
290 // A lazily parsed function literal won't have a body. | 290 // A lazily parsed function literal won't have a body. |
291 if (expr->scope()->is_lazily_parsed()) return; | 291 if (expr->scope()->was_lazily_parsed()) return; |
292 RECURSE_EXPRESSION(VisitStatements(expr->body())); | 292 RECURSE_EXPRESSION(VisitStatements(expr->body())); |
293 } | 293 } |
294 | 294 |
295 template <class Subclass> | 295 template <class Subclass> |
296 void AstTraversalVisitor<Subclass>::VisitNativeFunctionLiteral( | 296 void AstTraversalVisitor<Subclass>::VisitNativeFunctionLiteral( |
297 NativeFunctionLiteral* expr) { | 297 NativeFunctionLiteral* expr) { |
298 PROCESS_EXPRESSION(expr); | 298 PROCESS_EXPRESSION(expr); |
299 } | 299 } |
300 | 300 |
301 template <class Subclass> | 301 template <class Subclass> |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 | 496 |
497 #undef PROCESS_NODE | 497 #undef PROCESS_NODE |
498 #undef PROCESS_EXPRESSION | 498 #undef PROCESS_EXPRESSION |
499 #undef RECURSE_EXPRESSION | 499 #undef RECURSE_EXPRESSION |
500 #undef RECURSE | 500 #undef RECURSE |
501 | 501 |
502 } // namespace internal | 502 } // namespace internal |
503 } // namespace v8 | 503 } // namespace v8 |
504 | 504 |
505 #endif // V8_AST_AST_TRAVERSAL_VISITOR_H_ | 505 #endif // V8_AST_AST_TRAVERSAL_VISITOR_H_ |
OLD | NEW |