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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 void CallPrinter::VisitEmptyParentheses(EmptyParentheses* node) { | 370 void CallPrinter::VisitEmptyParentheses(EmptyParentheses* node) { |
371 UNREACHABLE(); | 371 UNREACHABLE(); |
372 } | 372 } |
373 | 373 |
374 void CallPrinter::VisitGetIterator(GetIterator* node) { | 374 void CallPrinter::VisitGetIterator(GetIterator* node) { |
375 Print("GetIterator("); | 375 Print("GetIterator("); |
376 Find(node->iterable(), true); | 376 Find(node->iterable(), true); |
377 Print(")"); | 377 Print(")"); |
378 } | 378 } |
379 | 379 |
| 380 void CallPrinter::VisitImportCallExpression(ImportCallExpression* node) { |
| 381 Print("ImportCall("); |
| 382 Find(node->argument(), true); |
| 383 Print(")"); |
| 384 } |
| 385 |
380 void CallPrinter::VisitThisFunction(ThisFunction* node) {} | 386 void CallPrinter::VisitThisFunction(ThisFunction* node) {} |
381 | 387 |
382 | 388 |
383 void CallPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) {} | 389 void CallPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) {} |
384 | 390 |
385 | 391 |
386 void CallPrinter::VisitSuperCallReference(SuperCallReference* node) { | 392 void CallPrinter::VisitSuperCallReference(SuperCallReference* node) { |
387 Print("super"); | 393 Print("super"); |
388 } | 394 } |
389 | 395 |
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1195 | 1201 |
1196 void AstPrinter::VisitEmptyParentheses(EmptyParentheses* node) { | 1202 void AstPrinter::VisitEmptyParentheses(EmptyParentheses* node) { |
1197 IndentedScope indent(this, "()", node->position()); | 1203 IndentedScope indent(this, "()", node->position()); |
1198 } | 1204 } |
1199 | 1205 |
1200 void AstPrinter::VisitGetIterator(GetIterator* node) { | 1206 void AstPrinter::VisitGetIterator(GetIterator* node) { |
1201 IndentedScope indent(this, "GET-ITERATOR", node->position()); | 1207 IndentedScope indent(this, "GET-ITERATOR", node->position()); |
1202 Visit(node->iterable()); | 1208 Visit(node->iterable()); |
1203 } | 1209 } |
1204 | 1210 |
| 1211 void AstPrinter::VisitImportCallExpression(ImportCallExpression* node) { |
| 1212 IndentedScope indent(this, "IMPORT-CALL", node->position()); |
| 1213 Visit(node->argument()); |
| 1214 } |
| 1215 |
1205 void AstPrinter::VisitThisFunction(ThisFunction* node) { | 1216 void AstPrinter::VisitThisFunction(ThisFunction* node) { |
1206 IndentedScope indent(this, "THIS-FUNCTION", node->position()); | 1217 IndentedScope indent(this, "THIS-FUNCTION", node->position()); |
1207 } | 1218 } |
1208 | 1219 |
1209 | 1220 |
1210 void AstPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) { | 1221 void AstPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) { |
1211 IndentedScope indent(this, "SUPER-PROPERTY-REFERENCE", node->position()); | 1222 IndentedScope indent(this, "SUPER-PROPERTY-REFERENCE", node->position()); |
1212 } | 1223 } |
1213 | 1224 |
1214 | 1225 |
1215 void AstPrinter::VisitSuperCallReference(SuperCallReference* node) { | 1226 void AstPrinter::VisitSuperCallReference(SuperCallReference* node) { |
1216 IndentedScope indent(this, "SUPER-CALL-REFERENCE", node->position()); | 1227 IndentedScope indent(this, "SUPER-CALL-REFERENCE", node->position()); |
1217 } | 1228 } |
1218 | 1229 |
1219 | 1230 |
1220 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { | 1231 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { |
1221 Visit(node->expression()); | 1232 Visit(node->expression()); |
1222 } | 1233 } |
1223 | 1234 |
1224 | 1235 |
1225 #endif // DEBUG | 1236 #endif // DEBUG |
1226 | 1237 |
1227 } // namespace internal | 1238 } // namespace internal |
1228 } // namespace v8 | 1239 } // namespace v8 |
OLD | NEW |