Home | History | Annotate | Download | only in ast

Lines Matching refs:node

40 void CallPrinter::Find(AstNode* node, bool print) {
45 Visit(node);
50 Visit(node);
93 void CallPrinter::VisitBlock(Block* node) {
94 FindStatements(node->statements());
98 void CallPrinter::VisitVariableDeclaration(VariableDeclaration* node) {}
101 void CallPrinter::VisitFunctionDeclaration(FunctionDeclaration* node) {}
104 void CallPrinter::VisitImportDeclaration(ImportDeclaration* node) {
108 void CallPrinter::VisitExportDeclaration(ExportDeclaration* node) {}
111 void CallPrinter::VisitExpressionStatement(ExpressionStatement* node) {
112 Find(node->expression());
116 void CallPrinter::VisitEmptyStatement(EmptyStatement* node) {}
120 SloppyBlockFunctionStatement* node) {
121 Find(node->statement());
125 void CallPrinter::VisitIfStatement(IfStatement* node) {
126 Find(node->condition());
127 Find(node->then_statement());
128 if (node->HasElseStatement()) {
129 Find(node->else_statement());
134 void CallPrinter::VisitContinueStatement(ContinueStatement* node) {}
137 void CallPrinter::VisitBreakStatement(BreakStatement* node) {}
140 void CallPrinter::VisitReturnStatement(ReturnStatement* node) {
141 Find(node->expression());
145 void CallPrinter::VisitWithStatement(WithStatement* node) {
146 Find(node->expression());
147 Find(node->statement());
151 void CallPrinter::VisitSwitchStatement(SwitchStatement* node) {
152 Find(node->tag());
153 ZoneList<CaseClause*>* cases = node->cases();
166 void CallPrinter::VisitDoWhileStatement(DoWhileStatement* node) {
167 Find(node->body());
168 Find(node->cond());
172 void CallPrinter::VisitWhileStatement(WhileStatement* node) {
173 Find(node->cond());
174 Find(node->body());
178 void CallPrinter::VisitForStatement(ForStatement* node) {
179 if (node->init() != NULL) {
180 Find(node->init());
182 if (node->cond() != NULL) Find(node->cond());
183 if (node->next() != NULL) Find(node->next());
184 Find(node->body());
188 void CallPrinter::VisitForInStatement(ForInStatement* node) {
189 Find(node->each());
190 Find(node->enumerable());
191 Find(node->body());
195 void CallPrinter::VisitForOfStatement(ForOfStatement* node) {
196 Find(node->assign_iterator());
197 Find(node->next_result());
198 Find(node->result_done());
199 Find(node->assign_each());
200 Find(node->body());
204 void CallPrinter::VisitTryCatchStatement(TryCatchStatement* node) {
205 Find(node->try_block());
206 Find(node->catch_block());
210 void CallPrinter::VisitTryFinallyStatement(TryFinallyStatement* node) {
211 Find(node->try_block());
212 Find(node->finally_block());
216 void CallPrinter::VisitDebuggerStatement(DebuggerStatement* node) {}
219 void CallPrinter::VisitFunctionLiteral(FunctionLiteral* node) {
220 FindStatements(node->body());
224 void CallPrinter::VisitClassLiteral(ClassLiteral* node) {
225 if (node->extends()) Find(node->extends());
226 for (int i = 0; i < node->properties()->length(); i++) {
227 Find(node->properties()->at(i)->value());
232 void CallPrinter::VisitNativeFunctionLiteral(NativeFunctionLiteral* node) {}
235 void CallPrinter::VisitDoExpression(DoExpression* node) { Find(node->block()); }
238 void CallPrinter::VisitConditional(Conditional* node) {
239 Find(node->condition());
240 Find(node->then_expression());
241 Find(node->else_expression());
245 void CallPrinter::VisitLiteral(Literal* node) {
246 PrintLiteral(*node->value(), true);
250 void CallPrinter::VisitRegExpLiteral(RegExpLiteral* node) {
252 PrintLiteral(*node->pattern(), false);
254 if (node->flags() & RegExp::kGlobal) Print("g");
255 if (node->flags() & RegExp::kIgnoreCase) Print("i");
256 if (node->flags() & RegExp::kMultiline) Print("m");
257 if (node->flags() & RegExp::kUnicode) Print("u");
258 if (node->flags() & RegExp::kSticky) Print("y");
262 void CallPrinter::VisitObjectLiteral(ObjectLiteral* node) {
263 for (int i = 0; i < node->properties()->length(); i++) {
264 Find(node->properties()->at(i)->value());
269 void CallPrinter::VisitArrayLiteral(ArrayLiteral* node) {
271 for (int i = 0; i < node->values()->length(); i++) {
273 Find(node->values()->at(i), true);
279 void CallPrinter::VisitVariableProxy(VariableProxy* node) {
284 PrintLiteral(*node->name(), false);
289 void CallPrinter::VisitAssignment(Assignment* node) {
290 Find(node->target());
291 Find(node->value());
295 void CallPrinter::VisitYield(Yield* node) { Find(node->expression()); }
298 void CallPrinter::VisitThrow(Throw* node) { Find(node->exception()); }
301 void CallPrinter::VisitProperty(Property* node) {
302 Expression* key = node->key();
305 Find(node->obj(), true);
309 Find(node->obj(), true);
317 void CallPrinter::VisitCall(Call* node) {
318 bool was_found = !found_ && node->position() == position_;
322 if (is_builtin_ && node->expression()->IsVariableProxy()) {
328 Find(node->expression(), true);
330 FindArguments(node->arguments());
335 void CallPrinter::VisitCallNew(CallNew* node) {
336 bool was_found = !found_ && node->position() == position_;
340 if (is_builtin_ && node->expression()->IsVariableProxy()) {
346 Find(node->expression(), was_found);
347 FindArguments(node->arguments());
352 void CallPrinter::VisitCallRuntime(CallRuntime* node) {
353 FindArguments(node->arguments());
357 void CallPrinter::VisitUnaryOperation(UnaryOperation* node) {
358 Token::Value op = node->op();
362 Find(node->expression(), true);
367 void CallPrinter::VisitCountOperation(CountOperation* node) {
369 if (node->is_prefix()) Print("%s", Token::String(node->op()));
370 Find(node->expression(), true);
371 if (node->is_postfix()) Print("%s", Token::String(node->op()));
376 void CallPrinter::VisitBinaryOperation(BinaryOperation* node) {
378 Find(node->left(), true);
379 Print(" %s ", Token::String(node->op()));
380 Find(node->right(), true);
385 void CallPrinter::VisitCompareOperation(CompareOperation* node) {
387 Find(node->left(), true);
388 Print(" %s ", Token::String(node->op()));
389 Find(node->right(), true);
394 void CallPrinter::VisitSpread(Spread* node) {
396 Find(node->expression(), true);
401 void CallPrinter::VisitEmptyParentheses(EmptyParentheses* node) {
406 void CallPrinter::VisitThisFunction(ThisFunction* node) {}
409 void CallPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) {}
412 void CallPrinter::VisitSuperCallReference(SuperCallReference* node) {
417 void CallPrinter::VisitRewritableExpression(RewritableExpression* node) {
418 Find(node->expression());
472 static int FormatSlotNode(Vector<char>* buf, Expression* node,
496 void PrettyPrinter::VisitBlock(Block* node) {
497 if (!node->ignore_completion_value()) Print("{ ");
498 PrintStatements(node->statements());
499 if (node->statements()->length() > 0) Print(" ");
500 if (!node->ignore_completion_value()) Print("}");
504 void PrettyPrinter::VisitVariableDeclaration(VariableDeclaration* node) {
506 PrintLiteral(node->proxy()->name(), false);
511 void PrettyPrinter::VisitFunctionDeclaration(FunctionDeclaration* node) {
513 PrintLiteral(node->proxy()->name(), false);
515 PrintFunctionLiteral(node->fun());
520 void PrettyPrinter::VisitImportDeclaration(ImportDeclaration* node) {
522 PrintLiteral(node->proxy()->name(), false);
524 PrintLiteral(node->module_specifier()->string(), true);
529 void PrettyPrinter::VisitExportDeclaration(ExportDeclaration* node) {
531 PrintLiteral(node->proxy()->name(), false);
536 void PrettyPrinter::VisitExpressionStatement(ExpressionStatement* node) {
537 Visit(node->expression());
542 void PrettyPrinter::VisitEmptyStatement(EmptyStatement* node) {
548 SloppyBlockFunctionStatement* node) {
549 Visit(node->statement());
553 void PrettyPrinter::VisitIfStatement(IfStatement* node) {
555 Visit(node->condition());
557 Visit(node->then_statement());
558 if (node->HasElseStatement()) {
560 Visit(node->else_statement());
565 void PrettyPrinter::VisitContinueStatement(ContinueStatement* node) {
567 ZoneList<const AstRawString*>* labels = node->target()->labels();
577 void PrettyPrinter::VisitBreakStatement(BreakStatement* node) {
579 ZoneList<const AstRawString*>* labels = node->target()->labels();
589 void PrettyPrinter::VisitReturnStatement(ReturnStatement* node) {
591 Visit(node->expression());
596 void PrettyPrinter::VisitWithStatement(WithStatement* node) {
598 Visit(node->expression());
600 Visit(node->statement());
604 void PrettyPrinter::VisitSwitchStatement(SwitchStatement* node) {
605 PrintLabels(node->labels());
607 Visit(node->tag());
609 ZoneList<CaseClause*>* cases = node->cases();
630 void PrettyPrinter::VisitDoWhileStatement(DoWhileStatement* node) {
631 PrintLabels(node->labels());
633 Visit(node->body());
635 Visit(node->cond());
640 void PrettyPrinter::VisitWhileStatement(WhileStatement* node) {
641 PrintLabels(node->labels());
643 Visit(node->cond());
645 Visit(node->body());
649 void PrettyPrinter::VisitForStatement(ForStatement* node) {
650 PrintLabels(node->labels());
652 if (node->init() != NULL) {
653 Visit(node->init());
658 if (node->cond() != NULL) Visit(node->cond());
660 if (node->next() != NULL) {
661 Visit(node->next()); // prints extra ';', unfortunately
665 Visit(node->body());
669 void PrettyPrinter::VisitForInStatement(ForInStatement* node) {
670 PrintLabels(node->labels());
672 Visit(node->each());
674 Visit(node->enumerable());
676 Visit(node->body());
680 void PrettyPrinter::VisitForOfStatement(ForOfStatement* node) {
685 PrintLabels(node->labels());
688 if (node->assign_iterator()->IsAssignment() &&
689 node->assign_iterator()->AsAssignment()->value()->IsCall() &&
690 node
696 node->assign_iterator()
702 Visit(node->assign_iterator()
713 Visit(node->body());
717 void PrettyPrinter::VisitTryCatchStatement(TryCatchStatement* node) {
719 Visit(node->try_block());
722 PrintLiteral(node->variable()->name(), quote);
724 Visit(node->catch_block());
728 void PrettyPrinter::VisitTryFinallyStatement(TryFinallyStatement* node) {
730 Visit(node->try_block());
732 Visit(node->finally_block());
736 void PrettyPrinter::VisitDebuggerStatement(DebuggerStatement* node) {
741 void PrettyPrinter::VisitFunctionLiteral(FunctionLiteral* node) {
743 PrintFunctionLiteral(node);
748 void PrettyPrinter::VisitClassLiteral(ClassLiteral* node) {
750 PrintLiteral(node->constructor()->name(), false);
751 if (node->extends()) {
753 Visit(node->extends());
756 for (int i = 0; i < node->properties()->length(); i++) {
757 PrintObjectLiteralProperty(node->properties()->at(i));
763 void PrettyPrinter::VisitNativeFunctionLiteral(NativeFunctionLiteral* node) {
765 PrintLiteral(node->name(), false);
770 void PrettyPrinter::VisitDoExpression(DoExpression* node) {
772 PrintStatements(node->block()->statements());
777 void PrettyPrinter::VisitConditional(Conditional* node) {
778 Visit(node->condition());
780 Visit(node->then_expression());
782 Visit(node->else_expression());
786 void PrettyPrinter::VisitLiteral(Literal* node) {
787 PrintLiteral(node->value(), true);
791 void PrettyPrinter::VisitRegExpLiteral(RegExpLiteral* node) {
793 PrintLiteral(node->pattern(), false);
795 if (node->flags() & RegExp::kGlobal) Print("g");
796 if (node->flags() & RegExp::kIgnoreCase) Print("i");
797 if (node->flags() & RegExp::kMultiline) Print("m");
798 if (node->flags() & RegExp::kUnicode) Print("u");
799 if (node->flags() & RegExp::kSticky) Print("y");
804 void PrettyPrinter::VisitObjectLiteral(ObjectLiteral* node) {
806 for (int i = 0; i < node->properties()->length(); i++) {
808 PrintObjectLiteralProperty(node->properties()->at(i));
824 void PrettyPrinter::VisitArrayLiteral(ArrayLiteral* node) {
826 Print(" literal_index = %d", node->literal_index());
827 for (int i = 0; i < node->values()->length(); i++) {
829 Visit(node->values()->at(i));
835 void PrettyPrinter::VisitVariableProxy(VariableProxy* node) {
836 PrintLiteral(node->name(), false);
840 void PrettyPrinter::VisitAssignment(Assignment* node) {
841 Visit(node->target());
842 Print(" %s ", Token::String(node->op()));
843 Visit(node->value());
847 void PrettyPrinter::VisitYield(Yield* node) {
849 Visit(node->expression());
853 void PrettyPrinter::VisitThrow(Throw* node) {
855 Visit(node->exception());
859 void PrettyPrinter::VisitProperty(Property* node) {
860 Expression* key = node->key();
864 Visit(node->obj());
868 Visit(node->obj());
876 void PrettyPrinter::VisitCall(Call* node) {
877 Visit(node->expression());
878 PrintArguments(node->arguments());
882 void PrettyPrinter::VisitCallNew(CallNew* node) {
884 Visit(node->expression());
886 PrintArguments(node->arguments());
890 void PrettyPrinter::VisitCallRuntime(CallRuntime* node) {
891 Print("%%%s\n", node->debug_name());
892 PrintArguments(node->arguments());
896 void PrettyPrinter::VisitUnaryOperation(UnaryOperation* node) {
897 Token::Value op = node->op();
901 Visit(node->expression());
906 void PrettyPrinter::VisitCountOperation(CountOperation* node) {
908 if (node->is_prefix()) Print("%s", Token::String(node->op()));
909 Visit(node->expression());
910 if (node->is_postfix()) Print("%s", Token::String(node->op()));
915 void PrettyPrinter::VisitBinaryOperation(BinaryOperation* node) {
917 Visit(node->left());
918 Print(" %s ", Token::String(node->op()));
919 Visit(node->right());
924 void PrettyPrinter::VisitCompareOperation(CompareOperation* node) {
926 Visit(node->left());
927 Print(" %s ", Token::String(node->op()));
928 Visit(node->right());
933 void PrettyPrinter::VisitSpread(Spread* node) {
935 Visit(node->expression());
940 void PrettyPrinter::VisitEmptyParentheses(EmptyParentheses* node) {
945 void PrettyPrinter::VisitThisFunction(ThisFunction* node) {
950 void PrettyPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) {
955 void PrettyPrinter::VisitSuperCallReference(SuperCallReference* node) {
960 void PrettyPrinter::VisitRewritableExpression(RewritableExpression* node) {
961 Visit(node->expression());
965 const char* PrettyPrinter::Print(AstNode* node) {
967 Visit(node);
989 void PrettyPrinter::PrintOut(Isolate* isolate, AstNode* node) {
991 PrintF("%s\n", printer.Print(node));
1215 void AstPrinter::PrintIndentedVisit(const char* s, AstNode* node) {
1216 IndentedScope indent(this, s, node->position());
1217 Visit(node);
1238 void AstPrinter::PrintOut(Isolate* isolate, AstNode* node) {
1241 printer.Visit(node);
1281 void AstPrinter::VisitBlock(Block* node) {
1283 node->ignore_completion_value() ? "BLOCK NOCOMPLETIONS" : "BLOCK";
1284 IndentedScope indent(this, block_txt, node->position());
1285 PrintStatements(node->statements());
1290 void AstPrinter::VisitVariableDeclaration(VariableDeclaration* node) {
1291 PrintLiteralWithModeIndented(Variable::Mode2String(node->mode()),
1292 node->proxy()->var(),
1293 node->proxy()->name());
1298 void AstPrinter::VisitFunctionDeclaration(FunctionDeclaration* node) {
1300 PrintLiteral(node->proxy()->name(), true);
1302 PrintLiteral(node->fun()->name(), false);
1307 void AstPrinter::VisitImportDeclaration(ImportDeclaration* node) {
1308 IndentedScope indent(this, "IMPORT", node->position());
1309 PrintLiteralIndented("NAME", node->proxy()->name(), true);
1310 PrintLiteralIndented("FROM", node->module_specifier()->string(), true);
1314 void AstPrinter::VisitExportDeclaration(ExportDeclaration* node) {
1315 IndentedScope indent(this, "EXPORT", node->position());
1316 PrintLiteral(node->proxy()->name(), true);
1320 void AstPrinter::VisitExpressionStatement(ExpressionStatement* node) {
1321 IndentedScope indent(this, "EXPRESSION STATEMENT", node->position());
1322 Visit(node->expression());
1326 void AstPrinter::VisitEmptyStatement(EmptyStatement* node) {
1327 IndentedScope indent(this, "EMPTY", node->position());
1332 SloppyBlockFunctionStatement* node) {
1333 Visit(node->statement());
1337 void AstPrinter::VisitIfStatement(IfStatement* node) {
1338 IndentedScope indent(this, "IF", node->position());
1339 PrintIndentedVisit("CONDITION", node->condition());
1340 PrintIndentedVisit("THEN", node->then_statement());
1341 if (node->HasElseStatement()) {
1342 PrintIndentedVisit("ELSE", node->else_statement());
1347 void AstPrinter::VisitContinueStatement(ContinueStatement* node) {
1348 IndentedScope indent(this, "CONTINUE", node->position());
1349 PrintLabelsIndented(node->target()->labels());
1353 void AstPrinter::VisitBreakStatement(BreakStatement* node) {
1354 IndentedScope indent(this, "BREAK", node->position());
1355 PrintLabelsIndented(node
1359 void AstPrinter::VisitReturnStatement(ReturnStatement* node) {
1360 IndentedScope indent(this, "RETURN", node->position());
1361 Visit(node->expression());
1365 void AstPrinter::VisitWithStatement(WithStatement* node) {
1366 IndentedScope indent(this, "WITH", node->position());
1367 PrintIndentedVisit("OBJECT", node->expression());
1368 PrintIndentedVisit("BODY", node->statement());
1372 void AstPrinter::VisitSwitchStatement(SwitchStatement* node) {
1373 IndentedScope indent(this, "SWITCH", node->position());
1374 PrintLabelsIndented(node->labels());
1375 PrintIndentedVisit("TAG", node->tag());
1376 for (int i = 0; i < node->cases()->length(); i++) {
1377 Visit(node->cases()->at(i));
1394 void AstPrinter::VisitDoWhileStatement(DoWhileStatement* node) {
1395 IndentedScope indent(this, "DO", node->position());
1397 Print(" %d\n", node->yield_count());
1398 PrintLabelsIndented(node->labels());
1399 PrintIndentedVisit("BODY", node->body());
1400 PrintIndentedVisit("COND", node->cond());
1404 void AstPrinter::VisitWhileStatement(WhileStatement* node) {
1405 IndentedScope indent(this, "WHILE", node->position());
1407 Print(" %d\n", node->yield_count());
1408 PrintLabelsIndented(node->labels());
1409 PrintIndentedVisit("COND", node->cond());
1410 PrintIndentedVisit("BODY", node->body());
1414 void AstPrinter::VisitForStatement(ForStatement* node) {
1415 IndentedScope indent(this, "FOR", node->position());
1417 Print(" %d\n", node->yield_count());
1418 PrintLabelsIndented(node->labels());
1419 if (node->init()) PrintIndentedVisit("INIT", node->init());
1420 if (node->cond()) PrintIndentedVisit("COND", node->cond());
1421 PrintIndentedVisit("BODY", node->body());
1422 if (node->next()) PrintIndentedVisit("NEXT", node->next());
1426 void AstPrinter::VisitForInStatement(ForInStatement* node) {
1427 IndentedScope indent(this, "FOR IN", node->position());
1429 Print(" %d\n", node->yield_count());
1430 PrintIndentedVisit("FOR", node->each());
1431 PrintIndentedVisit("IN", node->enumerable());
1432 PrintIndentedVisit("BODY", node->body());
1436 void AstPrinter::VisitForOfStatement(ForOfStatement* node) {
1437 IndentedScope indent(this, "FOR OF", node->position());
1439 Print(" %d\n", node->yield_count());
1440 PrintIndentedVisit("INIT", node->assign_iterator());
1441 PrintIndentedVisit("NEXT", node->next_result());
1442 PrintIndentedVisit("DONE", node->result_done());
1443 PrintIndentedVisit("EACH", node->assign_each());
1444 PrintIndentedVisit("BODY", node->body());
1448 void AstPrinter::VisitTryCatchStatement(TryCatchStatement* node) {
1449 IndentedScope indent(this, "TRY CATCH", node->position());
1450 PrintIndentedVisit("TRY", node->try_block());
1452 node->variable(),
1453 node->variable()->name());
1454 PrintIndentedVisit("CATCH", node->catch_block());
1458 void AstPrinter::VisitTryFinallyStatement(TryFinallyStatement* node) {
1459 IndentedScope indent(this, "TRY FINALLY", node->position());
1460 PrintIndentedVisit("TRY", node->try_block());
1461 PrintIndentedVisit("FINALLY", node->finally_block());
1465 void AstPrinter::VisitDebuggerStatement(DebuggerStatement* node) {
1466 IndentedScope indent(this, "DEBUGGER", node->position());
1470 void AstPrinter::VisitFunctionLiteral(FunctionLiteral* node) {
1471 IndentedScope indent(this, "FUNC LITERAL", node->position());
1472 PrintLiteralIndented("NAME", node->name(), false);
1473 PrintLiteralIndented("INFERRED NAME", node->inferred_name(), false);
1474 PrintParameters(node->scope());
1478 // PrintStatements(node->body());
1482 void AstPrinter::VisitClassLiteral(ClassLiteral* node) {
1483 IndentedScope indent(this, "CLASS LITERAL", node->position());
1484 PrintLiteralIndented("NAME", node->constructor()->name(), false);
1485 if (node->extends() != nullptr) {
1486 PrintIndentedVisit("EXTENDS", node->extends());
1488 PrintProperties(node->properties());
1527 void AstPrinter::VisitNativeFunctionLiteral(NativeFunctionLiteral* node) {
1528 IndentedScope indent(this, "NATIVE FUNC LITERAL", node->position());
1529 PrintLiteralIndented("NAME", node->name(), false);
1533 void AstPrinter::VisitDoExpression(DoExpression* node) {
1534 IndentedScope indent(this, "DO EXPRESSION", node->position());
1535 PrintStatements(node->block()->statements());
1539 void AstPrinter::VisitConditional(Conditional* node) {
1540 IndentedScope indent(this, "CONDITIONAL", node->position());
1541 PrintIndentedVisit("CONDITION", node->condition());
1542 PrintIndentedVisit("THEN", node->then_expression());
1543 PrintIndentedVisit("ELSE", node->else_expression());
1548 void AstPrinter::VisitLiteral(Literal* node) {
1549 PrintLiteralIndented("LITERAL", node->value(), true);
1553 void AstPrinter::VisitRegExpLiteral(RegExpLiteral* node) {
1554 IndentedScope indent(this, "REGEXP LITERAL", node->position());
1556 SNPrintF(buf, "literal_index = %d\n", node->literal_index());
1558 PrintLiteralIndented("PATTERN", node->pattern(), false);
1560 if (node->flags() & RegExp::kGlobal) buf[i++] = 'g';
1561 if (node->flags() & RegExp::kIgnoreCase) buf[i++] = 'i';
1562 if (node->flags() & RegExp::kMultiline) buf[i++] = 'm';
1563 if (node->flags() & RegExp::kUnicode) buf[i++] = 'u';
1564 if (node->flags() & RegExp::kSticky) buf[i++] = 'y';
1572 void AstPrinter::VisitObjectLiteral(ObjectLiteral* node) {
1573 IndentedScope indent(this, "OBJ LITERAL", node->position());
1575 SNPrintF(buf, "literal_index = %d\n", node->literal_index());
1577 PrintProperties(node->properties());
1581 void AstPrinter::VisitArrayLiteral(ArrayLiteral* node) {
1582 IndentedScope indent(this, "ARRAY LITERAL", node->position());
1585 SNPrintF(buf, "literal_index = %d\n", node->literal_index());
1587 if (node->values()->length() > 0) {
1588 IndentedScope indent(this, "VALUES", node->position());
1589 for (int i = 0; i < node->values()->length(); i++) {
1590 Visit(node->values()->at(i));
1596 void AstPrinter::VisitVariableProxy(VariableProxy* node) {
1599 FormatSlotNode(&buf, node, "VAR PROXY", node->VariableFeedbackSlot());
1601 if (!node->is_resolved()) {
1603 PrintLiteralWithModeIndented(buf.start(), nullptr, node->name());
1605 Variable* var = node->var();
1626 PrintLiteralWithModeIndented(buf.start(), var, node->name());
1631 void AstPrinter::VisitAssignment(Assignment* node) {
1632 IndentedScope indent(this, Token::Name(node->op()), node->position());
1633 Visit(node->target());
1634 Visit(node->value());
1638 void AstPrinter::VisitYield(Yield* node) {
1640 SNPrintF(buf, "YIELD id %d", node->yield_id());
1641 IndentedScope indent(this, buf.start(), node->position());
1642 Visit(node->expression());
1646 void AstPrinter::VisitThrow(Throw* node) {
1647 IndentedScope indent(this, "THROW", node->position());
1648 Visit(node->exception());
1652 void AstPrinter::VisitProperty(Property* node) {
1654 FormatSlotNode(&buf, node, "PROPERTY", node->PropertyFeedbackSlot());
1655 IndentedScope indent(this, buf.start(), node->position());
1657 Visit(node->obj());
1658 Literal* literal = node->key()->AsLiteral();
1662 PrintIndentedVisit("KEY", node->key());
1667 void AstPrinter::VisitCall(Call* node) {
1670 node->tail_call_mode() == TailCallMode::kAllow ? "TAIL CALL" : "CALL";
1671 FormatSlotNode(&buf, node, name, node->CallFeedbackICSlot());
1674 Visit(node->expression());
1675 PrintArguments(node->arguments());
1679 void AstPrinter::VisitCallNew(CallNew* node) {
1680 IndentedScope indent(this, "CALL NEW", node->position());
1681 Visit(node->expression());
1682 PrintArguments(node->arguments());
1686 void AstPrinter::VisitCallRuntime(CallRuntime* node) {
1688 SNPrintF(buf, "CALL RUNTIME %s", node->debug_name());
1689 IndentedScope indent(this, buf.start(), node->position());
1690 PrintArguments(node->arguments());
1694 void AstPrinter::VisitUnaryOperation(UnaryOperation* node) {
1695 IndentedScope indent(this, Token::Name(node->op()), node->position());
1696 Visit(node->expression());
1700 void AstPrinter::VisitCountOperation(CountOperation* node) {
1702 SNPrintF(buf, "%s %s", (node->is_prefix() ? "PRE" : "POST"),
1703 Token::Name(node->op()));
1704 IndentedScope indent(this, buf.start(), node->position());
1705 Visit(node->expression());
1709 void AstPrinter::VisitBinaryOperation(BinaryOperation* node) {
1710 IndentedScope indent(this, Token::Name(node->op()), node->position());
1711 Visit(node->left());
1712 Visit(node->right());
1716 void AstPrinter::VisitCompareOperation(CompareOperation* node) {
1717 IndentedScope indent(this, Token::Name(node->op()), node->position());
1718 Visit(node->left());
1719 Visit(node->right());
1723 void AstPrinter::VisitSpread(Spread* node) {
1724 IndentedScope indent(this, "...", node->position());
1725 Visit(node->expression());
1729 void AstPrinter::VisitEmptyParentheses(EmptyParentheses* node) {
1730 IndentedScope indent(this, "()", node->position());
1734 void AstPrinter::VisitThisFunction(ThisFunction* node) {
1735 IndentedScope indent(this, "THIS-FUNCTION", node->position());
1739 void AstPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) {
1740 IndentedScope indent(this, "SUPER-PROPERTY-REFERENCE", node->position());
1744 void AstPrinter::VisitSuperCallReference(SuperCallReference* node) {
1745 IndentedScope indent(this, "SUPER-CALL-REFERENCE", node->position());
1749 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) {
1750 Visit(node->expression());