| 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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 PROCESS_EXPRESSION(expr); | 440 PROCESS_EXPRESSION(expr); |
| 441 } | 441 } |
| 442 | 442 |
| 443 template <class Subclass> | 443 template <class Subclass> |
| 444 void AstTraversalVisitor<Subclass>::VisitClassLiteral(ClassLiteral* expr) { | 444 void AstTraversalVisitor<Subclass>::VisitClassLiteral(ClassLiteral* expr) { |
| 445 PROCESS_EXPRESSION(expr); | 445 PROCESS_EXPRESSION(expr); |
| 446 if (expr->extends() != nullptr) { | 446 if (expr->extends() != nullptr) { |
| 447 RECURSE_EXPRESSION(Visit(expr->extends())); | 447 RECURSE_EXPRESSION(Visit(expr->extends())); |
| 448 } | 448 } |
| 449 RECURSE_EXPRESSION(Visit(expr->constructor())); | 449 RECURSE_EXPRESSION(Visit(expr->constructor())); |
| 450 ZoneList<ObjectLiteralProperty*>* props = expr->properties(); | 450 ZoneList<ClassLiteralProperty*>* props = expr->properties(); |
| 451 for (int i = 0; i < props->length(); ++i) { | 451 for (int i = 0; i < props->length(); ++i) { |
| 452 ObjectLiteralProperty* prop = props->at(i); | 452 ClassLiteralProperty* prop = props->at(i); |
| 453 if (!prop->key()->IsLiteral()) { | 453 if (!prop->key()->IsLiteral()) { |
| 454 RECURSE_EXPRESSION(Visit(prop->key())); | 454 RECURSE_EXPRESSION(Visit(prop->key())); |
| 455 } | 455 } |
| 456 RECURSE_EXPRESSION(Visit(prop->value())); | 456 RECURSE_EXPRESSION(Visit(prop->value())); |
| 457 } | 457 } |
| 458 } | 458 } |
| 459 | 459 |
| 460 template <class Subclass> | 460 template <class Subclass> |
| 461 void AstTraversalVisitor<Subclass>::VisitSpread(Spread* expr) { | 461 void AstTraversalVisitor<Subclass>::VisitSpread(Spread* expr) { |
| 462 PROCESS_EXPRESSION(expr); | 462 PROCESS_EXPRESSION(expr); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 | 495 |
| 496 #undef PROCESS_NODE | 496 #undef PROCESS_NODE |
| 497 #undef PROCESS_EXPRESSION | 497 #undef PROCESS_EXPRESSION |
| 498 #undef RECURSE_EXPRESSION | 498 #undef RECURSE_EXPRESSION |
| 499 #undef RECURSE | 499 #undef RECURSE |
| 500 | 500 |
| 501 } // namespace internal | 501 } // namespace internal |
| 502 } // namespace v8 | 502 } // namespace v8 |
| 503 | 503 |
| 504 #endif // V8_AST_AST_TRAVERSAL_VISITOR_H_ | 504 #endif // V8_AST_AST_TRAVERSAL_VISITOR_H_ |
| OLD | NEW |