| 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 <stdarg.h> | 5 #include <stdarg.h> |
| 6 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #include "src/ast-value-factory.h" | 9 #include "src/ast-value-factory.h" |
| 10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 void CallPrinter::VisitSpread(Spread* node) { | 357 void CallPrinter::VisitSpread(Spread* node) { |
| 358 Print("(..."); | 358 Print("(..."); |
| 359 Find(node->expression(), true); | 359 Find(node->expression(), true); |
| 360 Print(")"); | 360 Print(")"); |
| 361 } | 361 } |
| 362 | 362 |
| 363 | 363 |
| 364 void CallPrinter::VisitThisFunction(ThisFunction* node) {} | 364 void CallPrinter::VisitThisFunction(ThisFunction* node) {} |
| 365 | 365 |
| 366 | 366 |
| 367 void CallPrinter::VisitSuperReference(SuperReference* node) {} | 367 void CallPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) {} |
| 368 |
| 369 |
| 370 void CallPrinter::VisitSuperCallReference(SuperCallReference* node) {} |
| 368 | 371 |
| 369 | 372 |
| 370 void CallPrinter::FindStatements(ZoneList<Statement*>* statements) { | 373 void CallPrinter::FindStatements(ZoneList<Statement*>* statements) { |
| 371 if (statements == NULL) return; | 374 if (statements == NULL) return; |
| 372 for (int i = 0; i < statements->length(); i++) { | 375 for (int i = 0; i < statements->length(); i++) { |
| 373 Find(statements->at(i)); | 376 Find(statements->at(i)); |
| 374 } | 377 } |
| 375 } | 378 } |
| 376 | 379 |
| 377 | 380 |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 Visit(node->expression()); | 831 Visit(node->expression()); |
| 829 Print(")"); | 832 Print(")"); |
| 830 } | 833 } |
| 831 | 834 |
| 832 | 835 |
| 833 void PrettyPrinter::VisitThisFunction(ThisFunction* node) { | 836 void PrettyPrinter::VisitThisFunction(ThisFunction* node) { |
| 834 Print("<this-function>"); | 837 Print("<this-function>"); |
| 835 } | 838 } |
| 836 | 839 |
| 837 | 840 |
| 838 void PrettyPrinter::VisitSuperReference(SuperReference* node) { | 841 void PrettyPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) { |
| 839 Print("<super-reference>"); | 842 Print("<super-property-reference>"); |
| 840 } | 843 } |
| 841 | 844 |
| 842 | 845 |
| 846 void PrettyPrinter::VisitSuperCallReference(SuperCallReference* node) { |
| 847 Print("<super-call-reference>"); |
| 848 } |
| 849 |
| 850 |
| 843 const char* PrettyPrinter::Print(AstNode* node) { | 851 const char* PrettyPrinter::Print(AstNode* node) { |
| 844 Init(); | 852 Init(); |
| 845 Visit(node); | 853 Visit(node); |
| 846 return output_; | 854 return output_; |
| 847 } | 855 } |
| 848 | 856 |
| 849 | 857 |
| 850 const char* PrettyPrinter::PrintExpression(FunctionLiteral* program) { | 858 const char* PrettyPrinter::PrintExpression(FunctionLiteral* program) { |
| 851 Init(); | 859 Init(); |
| 852 ExpressionStatement* statement = | 860 ExpressionStatement* statement = |
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1506 IndentedScope indent(this, "..."); | 1514 IndentedScope indent(this, "..."); |
| 1507 Visit(node->expression()); | 1515 Visit(node->expression()); |
| 1508 } | 1516 } |
| 1509 | 1517 |
| 1510 | 1518 |
| 1511 void AstPrinter::VisitThisFunction(ThisFunction* node) { | 1519 void AstPrinter::VisitThisFunction(ThisFunction* node) { |
| 1512 IndentedScope indent(this, "THIS-FUNCTION"); | 1520 IndentedScope indent(this, "THIS-FUNCTION"); |
| 1513 } | 1521 } |
| 1514 | 1522 |
| 1515 | 1523 |
| 1516 void AstPrinter::VisitSuperReference(SuperReference* node) { | 1524 void AstPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) { |
| 1517 IndentedScope indent(this, "SUPER-REFERENCE"); | 1525 IndentedScope indent(this, "SUPER-PROPERTY-REFERENCE"); |
| 1518 } | 1526 } |
| 1519 | 1527 |
| 1528 |
| 1529 void AstPrinter::VisitSuperCallReference(SuperCallReference* node) { |
| 1530 IndentedScope indent(this, "SUPER-CALL-REFERENCE"); |
| 1531 } |
| 1532 |
| 1533 |
| 1520 #endif // DEBUG | 1534 #endif // DEBUG |
| 1521 | 1535 |
| 1522 } } // namespace v8::internal | 1536 } } // namespace v8::internal |
| OLD | NEW |