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

Side by Side Diff: src/prettyprinter.cc

Issue 7837025: Remove ExitContextStatement. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 3 months 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 | Annotate | Revision Log
« no previous file with comments | « src/parser.cc ('k') | src/rewriter.cc » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 125
126 void PrettyPrinter::VisitWithStatement(WithStatement* node) { 126 void PrettyPrinter::VisitWithStatement(WithStatement* node) {
127 Print("with ("); 127 Print("with (");
128 Visit(node->expression()); 128 Visit(node->expression());
129 Print(") "); 129 Print(") ");
130 Visit(node->statement()); 130 Visit(node->statement());
131 } 131 }
132 132
133 133
134 void PrettyPrinter::VisitExitContextStatement(ExitContextStatement* node) {
135 Print("<exit context>");
136 }
137
138
139 void PrettyPrinter::VisitSwitchStatement(SwitchStatement* node) { 134 void PrettyPrinter::VisitSwitchStatement(SwitchStatement* node) {
140 PrintLabels(node->labels()); 135 PrintLabels(node->labels());
141 Print("switch ("); 136 Print("switch (");
142 Visit(node->tag()); 137 Visit(node->tag());
143 Print(") { "); 138 Print(") { ");
144 ZoneList<CaseClause*>* cases = node->cases(); 139 ZoneList<CaseClause*>* cases = node->cases();
145 for (int i = 0; i < cases->length(); i++) 140 for (int i = 0; i < cases->length(); i++)
146 PrintCaseClause(cases->at(i)); 141 PrintCaseClause(cases->at(i));
147 Print("}"); 142 Print("}");
148 } 143 }
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 } 771 }
777 772
778 773
779 void AstPrinter::VisitWithStatement(WithStatement* node) { 774 void AstPrinter::VisitWithStatement(WithStatement* node) {
780 IndentedScope indent(this, "WITH"); 775 IndentedScope indent(this, "WITH");
781 PrintIndentedVisit("OBJECT", node->expression()); 776 PrintIndentedVisit("OBJECT", node->expression());
782 PrintIndentedVisit("BODY", node->statement()); 777 PrintIndentedVisit("BODY", node->statement());
783 } 778 }
784 779
785 780
786 void AstPrinter::VisitExitContextStatement(ExitContextStatement* node) {
787 PrintIndented("EXIT CONTEXT\n");
788 }
789
790
791 void AstPrinter::VisitSwitchStatement(SwitchStatement* node) { 781 void AstPrinter::VisitSwitchStatement(SwitchStatement* node) {
792 IndentedScope indent(this, "SWITCH"); 782 IndentedScope indent(this, "SWITCH");
793 PrintLabelsIndented(NULL, node->labels()); 783 PrintLabelsIndented(NULL, node->labels());
794 PrintIndentedVisit("TAG", node->tag()); 784 PrintIndentedVisit("TAG", node->tag());
795 for (int i = 0; i < node->cases()->length(); i++) { 785 for (int i = 0; i < node->cases()->length(); i++) {
796 PrintCaseClause(node->cases()->at(i)); 786 PrintCaseClause(node->cases()->at(i));
797 } 787 }
798 } 788 }
799 789
800 790
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 } 1170 }
1181 1171
1182 1172
1183 void JsonAstBuilder::VisitWithStatement(WithStatement* stmt) { 1173 void JsonAstBuilder::VisitWithStatement(WithStatement* stmt) {
1184 TagScope tag(this, "WithStatement"); 1174 TagScope tag(this, "WithStatement");
1185 Visit(stmt->expression()); 1175 Visit(stmt->expression());
1186 Visit(stmt->statement()); 1176 Visit(stmt->statement());
1187 } 1177 }
1188 1178
1189 1179
1190 void JsonAstBuilder::VisitExitContextStatement(ExitContextStatement* stmt) {
1191 TagScope tag(this, "ExitContextStatement");
1192 }
1193
1194
1195 void JsonAstBuilder::VisitSwitchStatement(SwitchStatement* stmt) { 1180 void JsonAstBuilder::VisitSwitchStatement(SwitchStatement* stmt) {
1196 TagScope tag(this, "SwitchStatement"); 1181 TagScope tag(this, "SwitchStatement");
1197 } 1182 }
1198 1183
1199 1184
1200 void JsonAstBuilder::VisitDoWhileStatement(DoWhileStatement* stmt) { 1185 void JsonAstBuilder::VisitDoWhileStatement(DoWhileStatement* stmt) {
1201 TagScope tag(this, "DoWhileStatement"); 1186 TagScope tag(this, "DoWhileStatement");
1202 Visit(stmt->body()); 1187 Visit(stmt->body());
1203 Visit(stmt->cond()); 1188 Visit(stmt->cond());
1204 } 1189 }
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1444 AddAttribute("mode", Variable::Mode2String(decl->mode())); 1429 AddAttribute("mode", Variable::Mode2String(decl->mode()));
1445 } 1430 }
1446 Visit(decl->proxy()); 1431 Visit(decl->proxy());
1447 if (decl->fun() != NULL) Visit(decl->fun()); 1432 if (decl->fun() != NULL) Visit(decl->fun());
1448 } 1433 }
1449 1434
1450 1435
1451 #endif // DEBUG 1436 #endif // DEBUG
1452 1437
1453 } } // namespace v8::internal 1438 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | src/rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698