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 "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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 Print("(..."); | 363 Print("(..."); |
364 Find(node->expression(), true); | 364 Find(node->expression(), true); |
365 Print(")"); | 365 Print(")"); |
366 } | 366 } |
367 | 367 |
368 | 368 |
369 void CallPrinter::VisitEmptyParentheses(EmptyParentheses* node) { | 369 void CallPrinter::VisitEmptyParentheses(EmptyParentheses* node) { |
370 UNREACHABLE(); | 370 UNREACHABLE(); |
371 } | 371 } |
372 | 372 |
| 373 void CallPrinter::VisitGetIterator(GetIterator* node) { |
| 374 Print("GetIterator("); |
| 375 Find(node->iterable(), true); |
| 376 Print(")"); |
| 377 } |
373 | 378 |
374 void CallPrinter::VisitThisFunction(ThisFunction* node) {} | 379 void CallPrinter::VisitThisFunction(ThisFunction* node) {} |
375 | 380 |
376 | 381 |
377 void CallPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) {} | 382 void CallPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) {} |
378 | 383 |
379 | 384 |
380 void CallPrinter::VisitSuperCallReference(SuperCallReference* node) { | 385 void CallPrinter::VisitSuperCallReference(SuperCallReference* node) { |
381 Print("super"); | 386 Print("super"); |
382 } | 387 } |
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1174 void AstPrinter::VisitSpread(Spread* node) { | 1179 void AstPrinter::VisitSpread(Spread* node) { |
1175 IndentedScope indent(this, "...", node->position()); | 1180 IndentedScope indent(this, "...", node->position()); |
1176 Visit(node->expression()); | 1181 Visit(node->expression()); |
1177 } | 1182 } |
1178 | 1183 |
1179 | 1184 |
1180 void AstPrinter::VisitEmptyParentheses(EmptyParentheses* node) { | 1185 void AstPrinter::VisitEmptyParentheses(EmptyParentheses* node) { |
1181 IndentedScope indent(this, "()", node->position()); | 1186 IndentedScope indent(this, "()", node->position()); |
1182 } | 1187 } |
1183 | 1188 |
| 1189 void AstPrinter::VisitGetIterator(GetIterator* node) { |
| 1190 IndentedScope indent(this, "GET-ITERATOR", node->position()); |
| 1191 Visit(node->iterable()); |
| 1192 } |
1184 | 1193 |
1185 void AstPrinter::VisitThisFunction(ThisFunction* node) { | 1194 void AstPrinter::VisitThisFunction(ThisFunction* node) { |
1186 IndentedScope indent(this, "THIS-FUNCTION", node->position()); | 1195 IndentedScope indent(this, "THIS-FUNCTION", node->position()); |
1187 } | 1196 } |
1188 | 1197 |
1189 | 1198 |
1190 void AstPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) { | 1199 void AstPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) { |
1191 IndentedScope indent(this, "SUPER-PROPERTY-REFERENCE", node->position()); | 1200 IndentedScope indent(this, "SUPER-PROPERTY-REFERENCE", node->position()); |
1192 } | 1201 } |
1193 | 1202 |
1194 | 1203 |
1195 void AstPrinter::VisitSuperCallReference(SuperCallReference* node) { | 1204 void AstPrinter::VisitSuperCallReference(SuperCallReference* node) { |
1196 IndentedScope indent(this, "SUPER-CALL-REFERENCE", node->position()); | 1205 IndentedScope indent(this, "SUPER-CALL-REFERENCE", node->position()); |
1197 } | 1206 } |
1198 | 1207 |
1199 | 1208 |
1200 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { | 1209 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { |
1201 Visit(node->expression()); | 1210 Visit(node->expression()); |
1202 } | 1211 } |
1203 | 1212 |
1204 | 1213 |
1205 #endif // DEBUG | 1214 #endif // DEBUG |
1206 | 1215 |
1207 } // namespace internal | 1216 } // namespace internal |
1208 } // namespace v8 | 1217 } // namespace v8 |
OLD | NEW |