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