| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #include "src/ast/prettyprinter.h" | 5 #include "src/ast/prettyprinter.h" |
| 6 | 6 |
| 7 #include <stdarg.h> | 7 #include <stdarg.h> |
| 8 | 8 |
| 9 #include "src/ast/ast-value-factory.h" | 9 #include "src/ast/ast-value-factory.h" |
| 10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 | 405 |
| 406 | 406 |
| 407 void CallPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) {} | 407 void CallPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) {} |
| 408 | 408 |
| 409 | 409 |
| 410 void CallPrinter::VisitSuperCallReference(SuperCallReference* node) { | 410 void CallPrinter::VisitSuperCallReference(SuperCallReference* node) { |
| 411 Print("super"); | 411 Print("super"); |
| 412 } | 412 } |
| 413 | 413 |
| 414 | 414 |
| 415 void CallPrinter::VisitRewritableExpression(RewritableExpression* node) { | 415 void CallPrinter::VisitRewritableAssignmentExpression( |
| 416 RewritableAssignmentExpression* node) { |
| 416 Find(node->expression()); | 417 Find(node->expression()); |
| 417 } | 418 } |
| 418 | 419 |
| 419 | 420 |
| 420 void CallPrinter::FindStatements(ZoneList<Statement*>* statements) { | 421 void CallPrinter::FindStatements(ZoneList<Statement*>* statements) { |
| 421 if (statements == NULL) return; | 422 if (statements == NULL) return; |
| 422 for (int i = 0; i < statements->length(); i++) { | 423 for (int i = 0; i < statements->length(); i++) { |
| 423 Find(statements->at(i)); | 424 Find(statements->at(i)); |
| 424 } | 425 } |
| 425 } | 426 } |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 921 void PrettyPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) { | 922 void PrettyPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) { |
| 922 Print("<super-property-reference>"); | 923 Print("<super-property-reference>"); |
| 923 } | 924 } |
| 924 | 925 |
| 925 | 926 |
| 926 void PrettyPrinter::VisitSuperCallReference(SuperCallReference* node) { | 927 void PrettyPrinter::VisitSuperCallReference(SuperCallReference* node) { |
| 927 Print("<super-call-reference>"); | 928 Print("<super-call-reference>"); |
| 928 } | 929 } |
| 929 | 930 |
| 930 | 931 |
| 931 void PrettyPrinter::VisitRewritableExpression(RewritableExpression* node) { | 932 void PrettyPrinter::VisitRewritableAssignmentExpression( |
| 933 RewritableAssignmentExpression* node) { |
| 932 Visit(node->expression()); | 934 Visit(node->expression()); |
| 933 } | 935 } |
| 934 | 936 |
| 935 | 937 |
| 936 const char* PrettyPrinter::Print(AstNode* node) { | 938 const char* PrettyPrinter::Print(AstNode* node) { |
| 937 Init(); | 939 Init(); |
| 938 Visit(node); | 940 Visit(node); |
| 939 return output_; | 941 return output_; |
| 940 } | 942 } |
| 941 | 943 |
| (...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1696 void AstPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) { | 1698 void AstPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) { |
| 1697 IndentedScope indent(this, "SUPER-PROPERTY-REFERENCE", node->position()); | 1699 IndentedScope indent(this, "SUPER-PROPERTY-REFERENCE", node->position()); |
| 1698 } | 1700 } |
| 1699 | 1701 |
| 1700 | 1702 |
| 1701 void AstPrinter::VisitSuperCallReference(SuperCallReference* node) { | 1703 void AstPrinter::VisitSuperCallReference(SuperCallReference* node) { |
| 1702 IndentedScope indent(this, "SUPER-CALL-REFERENCE", node->position()); | 1704 IndentedScope indent(this, "SUPER-CALL-REFERENCE", node->position()); |
| 1703 } | 1705 } |
| 1704 | 1706 |
| 1705 | 1707 |
| 1706 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { | 1708 void AstPrinter::VisitRewritableAssignmentExpression( |
| 1709 RewritableAssignmentExpression* node) { |
| 1707 Visit(node->expression()); | 1710 Visit(node->expression()); |
| 1708 } | 1711 } |
| 1709 | 1712 |
| 1710 | 1713 |
| 1711 #endif // DEBUG | 1714 #endif // DEBUG |
| 1712 | 1715 |
| 1713 } // namespace internal | 1716 } // namespace internal |
| 1714 } // namespace v8 | 1717 } // namespace v8 |
| OLD | NEW |