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

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

Issue 2703563002: [ESNext] Implement DynamicImportCall (Closed)
Patch Set: rebase Created 3 years, 8 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
« no previous file with comments | « src/ast/ast-traversal-visitor.h ('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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 bool was_found = !found_ && node->position() == position_; 377 bool was_found = !found_ && node->position() == position_;
378 if (was_found) { 378 if (was_found) {
379 found_ = true; 379 found_ = true;
380 } 380 }
381 Find(node->iterable(), true); 381 Find(node->iterable(), true);
382 Print(node->hint() == IteratorType::kNormal ? "[Symbol.iterator]" 382 Print(node->hint() == IteratorType::kNormal ? "[Symbol.iterator]"
383 : "[Symbol.asyncIterator]"); 383 : "[Symbol.asyncIterator]");
384 if (was_found) done_ = true; 384 if (was_found) done_ = true;
385 } 385 }
386 386
387 void CallPrinter::VisitImportCallExpression(ImportCallExpression* node) {
388 Print("ImportCall(");
389 Find(node->argument(), true);
390 Print(")");
391 }
392
387 void CallPrinter::VisitThisFunction(ThisFunction* node) {} 393 void CallPrinter::VisitThisFunction(ThisFunction* node) {}
388 394
389 395
390 void CallPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) {} 396 void CallPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) {}
391 397
392 398
393 void CallPrinter::VisitSuperCallReference(SuperCallReference* node) { 399 void CallPrinter::VisitSuperCallReference(SuperCallReference* node) {
394 Print("super"); 400 Print("super");
395 } 401 }
396 402
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 1202
1197 void AstPrinter::VisitEmptyParentheses(EmptyParentheses* node) { 1203 void AstPrinter::VisitEmptyParentheses(EmptyParentheses* node) {
1198 IndentedScope indent(this, "()", node->position()); 1204 IndentedScope indent(this, "()", node->position());
1199 } 1205 }
1200 1206
1201 void AstPrinter::VisitGetIterator(GetIterator* node) { 1207 void AstPrinter::VisitGetIterator(GetIterator* node) {
1202 IndentedScope indent(this, "GET-ITERATOR", node->position()); 1208 IndentedScope indent(this, "GET-ITERATOR", node->position());
1203 Visit(node->iterable()); 1209 Visit(node->iterable());
1204 } 1210 }
1205 1211
1212 void AstPrinter::VisitImportCallExpression(ImportCallExpression* node) {
1213 IndentedScope indent(this, "IMPORT-CALL", node->position());
1214 Visit(node->argument());
1215 }
1216
1206 void AstPrinter::VisitThisFunction(ThisFunction* node) { 1217 void AstPrinter::VisitThisFunction(ThisFunction* node) {
1207 IndentedScope indent(this, "THIS-FUNCTION", node->position()); 1218 IndentedScope indent(this, "THIS-FUNCTION", node->position());
1208 } 1219 }
1209 1220
1210 1221
1211 void AstPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) { 1222 void AstPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) {
1212 IndentedScope indent(this, "SUPER-PROPERTY-REFERENCE", node->position()); 1223 IndentedScope indent(this, "SUPER-PROPERTY-REFERENCE", node->position());
1213 } 1224 }
1214 1225
1215 1226
1216 void AstPrinter::VisitSuperCallReference(SuperCallReference* node) { 1227 void AstPrinter::VisitSuperCallReference(SuperCallReference* node) {
1217 IndentedScope indent(this, "SUPER-CALL-REFERENCE", node->position()); 1228 IndentedScope indent(this, "SUPER-CALL-REFERENCE", node->position());
1218 } 1229 }
1219 1230
1220 1231
1221 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { 1232 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) {
1222 Visit(node->expression()); 1233 Visit(node->expression());
1223 } 1234 }
1224 1235
1225 1236
1226 #endif // DEBUG 1237 #endif // DEBUG
1227 1238
1228 } // namespace internal 1239 } // namespace internal
1229 } // namespace v8 1240 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast-traversal-visitor.h ('k') | src/bailout-reason.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698