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 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1520 IndentedScope indent(this, "..."); | 1528 IndentedScope indent(this, "..."); |
1521 Visit(node->expression()); | 1529 Visit(node->expression()); |
1522 } | 1530 } |
1523 | 1531 |
1524 | 1532 |
1525 void AstPrinter::VisitThisFunction(ThisFunction* node) { | 1533 void AstPrinter::VisitThisFunction(ThisFunction* node) { |
1526 IndentedScope indent(this, "THIS-FUNCTION"); | 1534 IndentedScope indent(this, "THIS-FUNCTION"); |
1527 } | 1535 } |
1528 | 1536 |
1529 | 1537 |
1530 void AstPrinter::VisitSuperReference(SuperReference* node) { | 1538 void AstPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) { |
1531 IndentedScope indent(this, "SUPER-REFERENCE"); | 1539 IndentedScope indent(this, "SUPER-PROPERTY-REFERENCE"); |
1532 } | 1540 } |
1533 | 1541 |
| 1542 |
| 1543 void AstPrinter::VisitSuperCallReference(SuperCallReference* node) { |
| 1544 IndentedScope indent(this, "SUPER-CALL-REFERENCE"); |
| 1545 } |
| 1546 |
| 1547 |
1534 #endif // DEBUG | 1548 #endif // DEBUG |
1535 | 1549 |
1536 } } // namespace v8::internal | 1550 } } // namespace v8::internal |
OLD | NEW |