| OLD | NEW |
| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 Visit(node->expression()); | 129 Visit(node->expression()); |
| 130 Print(") "); | 130 Print(") "); |
| 131 } | 131 } |
| 132 | 132 |
| 133 | 133 |
| 134 void PrettyPrinter::VisitExitContextStatement(ExitContextStatement* node) { | 134 void PrettyPrinter::VisitExitContextStatement(ExitContextStatement* node) { |
| 135 Print("<exit context>"); | 135 Print("<exit context>"); |
| 136 } | 136 } |
| 137 | 137 |
| 138 | 138 |
| 139 void PrettyPrinter::VisitExitScopedBlockStatement( |
| 140 ExitScopedBlockStatement* node) { |
| 141 Print("<exit scoped block>"); |
| 142 } |
| 143 |
| 144 |
| 139 void PrettyPrinter::VisitSwitchStatement(SwitchStatement* node) { | 145 void PrettyPrinter::VisitSwitchStatement(SwitchStatement* node) { |
| 140 PrintLabels(node->labels()); | 146 PrintLabels(node->labels()); |
| 141 Print("switch ("); | 147 Print("switch ("); |
| 142 Visit(node->tag()); | 148 Visit(node->tag()); |
| 143 Print(") { "); | 149 Print(") { "); |
| 144 ZoneList<CaseClause*>* cases = node->cases(); | 150 ZoneList<CaseClause*>* cases = node->cases(); |
| 145 for (int i = 0; i < cases->length(); i++) | 151 for (int i = 0; i < cases->length(); i++) |
| 146 PrintCaseClause(cases->at(i)); | 152 PrintCaseClause(cases->at(i)); |
| 147 Print("}"); | 153 Print("}"); |
| 148 } | 154 } |
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 EnterWithContextStatement* node) { | 808 EnterWithContextStatement* node) { |
| 803 PrintIndentedVisit("ENTER WITH CONTEXT", node->expression()); | 809 PrintIndentedVisit("ENTER WITH CONTEXT", node->expression()); |
| 804 } | 810 } |
| 805 | 811 |
| 806 | 812 |
| 807 void AstPrinter::VisitExitContextStatement(ExitContextStatement* node) { | 813 void AstPrinter::VisitExitContextStatement(ExitContextStatement* node) { |
| 808 PrintIndented("EXIT CONTEXT\n"); | 814 PrintIndented("EXIT CONTEXT\n"); |
| 809 } | 815 } |
| 810 | 816 |
| 811 | 817 |
| 818 void AstPrinter::VisitExitScopedBlockStatement(ExitScopedBlockStatement* node) { |
| 819 PrintIndented("EXIT SCOPED BLOCK\n"); |
| 820 } |
| 821 |
| 822 |
| 812 void AstPrinter::VisitSwitchStatement(SwitchStatement* node) { | 823 void AstPrinter::VisitSwitchStatement(SwitchStatement* node) { |
| 813 IndentedScope indent(this, "SWITCH"); | 824 IndentedScope indent(this, "SWITCH"); |
| 814 PrintLabelsIndented(NULL, node->labels()); | 825 PrintLabelsIndented(NULL, node->labels()); |
| 815 PrintIndentedVisit("TAG", node->tag()); | 826 PrintIndentedVisit("TAG", node->tag()); |
| 816 for (int i = 0; i < node->cases()->length(); i++) { | 827 for (int i = 0; i < node->cases()->length(); i++) { |
| 817 PrintCaseClause(node->cases()->at(i)); | 828 PrintCaseClause(node->cases()->at(i)); |
| 818 } | 829 } |
| 819 } | 830 } |
| 820 | 831 |
| 821 | 832 |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1199 TagScope tag(this, "EnterWithContextStatement"); | 1210 TagScope tag(this, "EnterWithContextStatement"); |
| 1200 Visit(stmt->expression()); | 1211 Visit(stmt->expression()); |
| 1201 } | 1212 } |
| 1202 | 1213 |
| 1203 | 1214 |
| 1204 void JsonAstBuilder::VisitExitContextStatement(ExitContextStatement* stmt) { | 1215 void JsonAstBuilder::VisitExitContextStatement(ExitContextStatement* stmt) { |
| 1205 TagScope tag(this, "ExitContextStatement"); | 1216 TagScope tag(this, "ExitContextStatement"); |
| 1206 } | 1217 } |
| 1207 | 1218 |
| 1208 | 1219 |
| 1220 void JsonAstBuilder::VisitExitScopedBlockStatement( |
| 1221 ExitScopedBlockStatement* stmt) { |
| 1222 TagScope tag(this, "ExitScopedBlockStatement"); |
| 1223 } |
| 1224 |
| 1225 |
| 1209 void JsonAstBuilder::VisitSwitchStatement(SwitchStatement* stmt) { | 1226 void JsonAstBuilder::VisitSwitchStatement(SwitchStatement* stmt) { |
| 1210 TagScope tag(this, "SwitchStatement"); | 1227 TagScope tag(this, "SwitchStatement"); |
| 1211 } | 1228 } |
| 1212 | 1229 |
| 1213 | 1230 |
| 1214 void JsonAstBuilder::VisitDoWhileStatement(DoWhileStatement* stmt) { | 1231 void JsonAstBuilder::VisitDoWhileStatement(DoWhileStatement* stmt) { |
| 1215 TagScope tag(this, "DoWhileStatement"); | 1232 TagScope tag(this, "DoWhileStatement"); |
| 1216 Visit(stmt->body()); | 1233 Visit(stmt->body()); |
| 1217 Visit(stmt->cond()); | 1234 Visit(stmt->cond()); |
| 1218 } | 1235 } |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1465 AddAttribute("mode", Variable::Mode2String(decl->mode())); | 1482 AddAttribute("mode", Variable::Mode2String(decl->mode())); |
| 1466 } | 1483 } |
| 1467 Visit(decl->proxy()); | 1484 Visit(decl->proxy()); |
| 1468 if (decl->fun() != NULL) Visit(decl->fun()); | 1485 if (decl->fun() != NULL) Visit(decl->fun()); |
| 1469 } | 1486 } |
| 1470 | 1487 |
| 1471 | 1488 |
| 1472 #endif // DEBUG | 1489 #endif // DEBUG |
| 1473 | 1490 |
| 1474 } } // namespace v8::internal | 1491 } } // namespace v8::internal |
| OLD | NEW |