Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Side by Side Diff: src/ast/prettyprinter.cc

Issue 1309813007: [es6] implement destructuring assignment (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase*** oops Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ast/ast-numbering.cc ('k') | src/bailout-reason.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 413
414 414
415 void CallPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) {} 415 void CallPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) {}
416 416
417 417
418 void CallPrinter::VisitSuperCallReference(SuperCallReference* node) { 418 void CallPrinter::VisitSuperCallReference(SuperCallReference* node) {
419 Print("super"); 419 Print("super");
420 } 420 }
421 421
422 422
423 void CallPrinter::VisitRewritableAssignmentExpression(
424 RewritableAssignmentExpression* node) {
425 Find(node->expression());
426 }
427
428
423 void CallPrinter::FindStatements(ZoneList<Statement*>* statements) { 429 void CallPrinter::FindStatements(ZoneList<Statement*>* statements) {
424 if (statements == NULL) return; 430 if (statements == NULL) return;
425 for (int i = 0; i < statements->length(); i++) { 431 for (int i = 0; i < statements->length(); i++) {
426 Find(statements->at(i)); 432 Find(statements->at(i));
427 } 433 }
428 } 434 }
429 435
430 436
431 void CallPrinter::FindArguments(ZoneList<Expression*>* arguments) { 437 void CallPrinter::FindArguments(ZoneList<Expression*>* arguments) {
432 if (found_) return; 438 if (found_) return;
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 void PrettyPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) { 930 void PrettyPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) {
925 Print("<super-property-reference>"); 931 Print("<super-property-reference>");
926 } 932 }
927 933
928 934
929 void PrettyPrinter::VisitSuperCallReference(SuperCallReference* node) { 935 void PrettyPrinter::VisitSuperCallReference(SuperCallReference* node) {
930 Print("<super-call-reference>"); 936 Print("<super-call-reference>");
931 } 937 }
932 938
933 939
940 void PrettyPrinter::VisitRewritableAssignmentExpression(
941 RewritableAssignmentExpression* node) {
942 Visit(node->expression());
943 }
944
945
934 const char* PrettyPrinter::Print(AstNode* node) { 946 const char* PrettyPrinter::Print(AstNode* node) {
935 Init(); 947 Init();
936 Visit(node); 948 Visit(node);
937 return output_; 949 return output_;
938 } 950 }
939 951
940 952
941 const char* PrettyPrinter::PrintExpression(FunctionLiteral* program) { 953 const char* PrettyPrinter::PrintExpression(FunctionLiteral* program) {
942 Init(); 954 Init();
943 ExpressionStatement* statement = 955 ExpressionStatement* statement =
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
1675 void AstPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) { 1687 void AstPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) {
1676 IndentedScope indent(this, "SUPER-PROPERTY-REFERENCE", node->position()); 1688 IndentedScope indent(this, "SUPER-PROPERTY-REFERENCE", node->position());
1677 } 1689 }
1678 1690
1679 1691
1680 void AstPrinter::VisitSuperCallReference(SuperCallReference* node) { 1692 void AstPrinter::VisitSuperCallReference(SuperCallReference* node) {
1681 IndentedScope indent(this, "SUPER-CALL-REFERENCE", node->position()); 1693 IndentedScope indent(this, "SUPER-CALL-REFERENCE", node->position());
1682 } 1694 }
1683 1695
1684 1696
1697 void AstPrinter::VisitRewritableAssignmentExpression(
1698 RewritableAssignmentExpression* node) {
1699 Visit(node->expression());
1700 }
1701
1702
1685 #endif // DEBUG 1703 #endif // DEBUG
1686 1704
1687 } // namespace internal 1705 } // namespace internal
1688 } // namespace v8 1706 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast-numbering.cc ('k') | src/bailout-reason.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698