• Home
  • Raw
  • Download

Lines Matching refs:node

55 void CallPrinter::Find(AstNode* node, bool print) {  in Find()  argument
59 Visit(node); in Find()
64 Visit(node); in Find()
80 void CallPrinter::VisitBlock(Block* node) { in VisitBlock() argument
81 FindStatements(node->statements()); in VisitBlock()
85 void CallPrinter::VisitVariableDeclaration(VariableDeclaration* node) {} in VisitVariableDeclaration() argument
88 void CallPrinter::VisitFunctionDeclaration(FunctionDeclaration* node) {} in VisitFunctionDeclaration() argument
91 void CallPrinter::VisitExpressionStatement(ExpressionStatement* node) { in VisitExpressionStatement() argument
92 Find(node->expression()); in VisitExpressionStatement()
96 void CallPrinter::VisitEmptyStatement(EmptyStatement* node) {} in VisitEmptyStatement() argument
100 SloppyBlockFunctionStatement* node) { in VisitSloppyBlockFunctionStatement() argument
101 Find(node->statement()); in VisitSloppyBlockFunctionStatement()
105 void CallPrinter::VisitIfStatement(IfStatement* node) { in VisitIfStatement() argument
106 Find(node->condition()); in VisitIfStatement()
107 Find(node->then_statement()); in VisitIfStatement()
108 if (node->HasElseStatement()) { in VisitIfStatement()
109 Find(node->else_statement()); in VisitIfStatement()
114 void CallPrinter::VisitContinueStatement(ContinueStatement* node) {} in VisitContinueStatement() argument
117 void CallPrinter::VisitBreakStatement(BreakStatement* node) {} in VisitBreakStatement() argument
120 void CallPrinter::VisitReturnStatement(ReturnStatement* node) { in VisitReturnStatement() argument
121 Find(node->expression()); in VisitReturnStatement()
125 void CallPrinter::VisitWithStatement(WithStatement* node) { in VisitWithStatement() argument
126 Find(node->expression()); in VisitWithStatement()
127 Find(node->statement()); in VisitWithStatement()
131 void CallPrinter::VisitSwitchStatement(SwitchStatement* node) { in VisitSwitchStatement() argument
132 Find(node->tag()); in VisitSwitchStatement()
133 for (CaseClause* clause : *node->cases()) { in VisitSwitchStatement()
140 void CallPrinter::VisitDoWhileStatement(DoWhileStatement* node) { in VisitDoWhileStatement() argument
141 Find(node->body()); in VisitDoWhileStatement()
142 Find(node->cond()); in VisitDoWhileStatement()
146 void CallPrinter::VisitWhileStatement(WhileStatement* node) { in VisitWhileStatement() argument
147 Find(node->cond()); in VisitWhileStatement()
148 Find(node->body()); in VisitWhileStatement()
152 void CallPrinter::VisitForStatement(ForStatement* node) { in VisitForStatement() argument
153 if (node->init() != nullptr) { in VisitForStatement()
154 Find(node->init()); in VisitForStatement()
156 if (node->cond() != nullptr) Find(node->cond()); in VisitForStatement()
157 if (node->next() != nullptr) Find(node->next()); in VisitForStatement()
158 Find(node->body()); in VisitForStatement()
162 void CallPrinter::VisitForInStatement(ForInStatement* node) { in VisitForInStatement() argument
163 Find(node->each()); in VisitForInStatement()
164 Find(node->enumerable()); in VisitForInStatement()
165 Find(node->body()); in VisitForInStatement()
169 void CallPrinter::VisitForOfStatement(ForOfStatement* node) { in VisitForOfStatement() argument
170 Find(node->assign_iterator()); in VisitForOfStatement()
171 Find(node->next_result()); in VisitForOfStatement()
172 Find(node->result_done()); in VisitForOfStatement()
173 Find(node->assign_each()); in VisitForOfStatement()
174 Find(node->body()); in VisitForOfStatement()
178 void CallPrinter::VisitTryCatchStatement(TryCatchStatement* node) { in VisitTryCatchStatement() argument
179 Find(node->try_block()); in VisitTryCatchStatement()
180 Find(node->catch_block()); in VisitTryCatchStatement()
184 void CallPrinter::VisitTryFinallyStatement(TryFinallyStatement* node) { in VisitTryFinallyStatement() argument
185 Find(node->try_block()); in VisitTryFinallyStatement()
186 Find(node->finally_block()); in VisitTryFinallyStatement()
190 void CallPrinter::VisitDebuggerStatement(DebuggerStatement* node) {} in VisitDebuggerStatement() argument
193 void CallPrinter::VisitFunctionLiteral(FunctionLiteral* node) { in VisitFunctionLiteral() argument
195 function_kind_ = node->kind(); in VisitFunctionLiteral()
196 FindStatements(node->body()); in VisitFunctionLiteral()
201 void CallPrinter::VisitClassLiteral(ClassLiteral* node) { in VisitClassLiteral() argument
202 if (node->extends()) Find(node->extends()); in VisitClassLiteral()
203 for (int i = 0; i < node->properties()->length(); i++) { in VisitClassLiteral()
204 Find(node->properties()->at(i)->value()); in VisitClassLiteral()
209 InitializeClassFieldsStatement* node) { in VisitInitializeClassFieldsStatement() argument
210 for (int i = 0; i < node->fields()->length(); i++) { in VisitInitializeClassFieldsStatement()
211 Find(node->fields()->at(i)->value()); in VisitInitializeClassFieldsStatement()
215 void CallPrinter::VisitNativeFunctionLiteral(NativeFunctionLiteral* node) {} in VisitNativeFunctionLiteral() argument
218 void CallPrinter::VisitDoExpression(DoExpression* node) { Find(node->block()); } in VisitDoExpression() argument
221 void CallPrinter::VisitConditional(Conditional* node) { in VisitConditional() argument
222 Find(node->condition()); in VisitConditional()
223 Find(node->then_expression()); in VisitConditional()
224 Find(node->else_expression()); in VisitConditional()
228 void CallPrinter::VisitLiteral(Literal* node) { in VisitLiteral() argument
231 PrintLiteral(node->BuildValue(isolate_), true); in VisitLiteral()
235 void CallPrinter::VisitRegExpLiteral(RegExpLiteral* node) { in VisitRegExpLiteral() argument
237 PrintLiteral(node->pattern(), false); in VisitRegExpLiteral()
239 if (node->flags() & RegExp::kGlobal) Print("g"); in VisitRegExpLiteral()
240 if (node->flags() & RegExp::kIgnoreCase) Print("i"); in VisitRegExpLiteral()
241 if (node->flags() & RegExp::kMultiline) Print("m"); in VisitRegExpLiteral()
242 if (node->flags() & RegExp::kUnicode) Print("u"); in VisitRegExpLiteral()
243 if (node->flags() & RegExp::kSticky) Print("y"); in VisitRegExpLiteral()
247 void CallPrinter::VisitObjectLiteral(ObjectLiteral* node) { in VisitObjectLiteral() argument
249 for (int i = 0; i < node->properties()->length(); i++) { in VisitObjectLiteral()
250 Find(node->properties()->at(i)->value()); in VisitObjectLiteral()
256 void CallPrinter::VisitArrayLiteral(ArrayLiteral* node) { in VisitArrayLiteral() argument
258 for (int i = 0; i < node->values()->length(); i++) { in VisitArrayLiteral()
260 Expression* subexpr = node->values()->at(i); in VisitArrayLiteral()
276 void CallPrinter::VisitVariableProxy(VariableProxy* node) { in VisitVariableProxy() argument
278 PrintLiteral(node->name(), false); in VisitVariableProxy()
286 void CallPrinter::VisitAssignment(Assignment* node) { in VisitAssignment() argument
287 Find(node->target()); in VisitAssignment()
288 Find(node->value()); in VisitAssignment()
291 void CallPrinter::VisitCompoundAssignment(CompoundAssignment* node) { in VisitCompoundAssignment() argument
292 VisitAssignment(node); in VisitCompoundAssignment()
295 void CallPrinter::VisitYield(Yield* node) { Find(node->expression()); } in VisitYield() argument
297 void CallPrinter::VisitYieldStar(YieldStar* node) { in VisitYieldStar() argument
298 if (!found_ && position_ == node->expression()->position()) { in VisitYieldStar()
306 Find(node->expression()); in VisitYieldStar()
309 void CallPrinter::VisitAwait(Await* node) { Find(node->expression()); } in VisitAwait() argument
311 void CallPrinter::VisitThrow(Throw* node) { Find(node->exception()); } in VisitThrow() argument
314 void CallPrinter::VisitProperty(Property* node) { in VisitProperty() argument
315 Expression* key = node->key(); in VisitProperty()
319 Find(node->obj(), true); in VisitProperty()
325 Find(node->obj(), true); in VisitProperty()
332 void CallPrinter::VisitResolvedProperty(ResolvedProperty* node) {} in VisitResolvedProperty() argument
334 void CallPrinter::VisitCall(Call* node) { in VisitCall() argument
336 if (node->position() == position_) { in VisitCall()
343 if (!is_user_js_ && node->expression()->IsVariableProxy()) { in VisitCall()
349 Find(node->expression(), true); in VisitCall()
351 FindArguments(node->arguments()); in VisitCall()
359 void CallPrinter::VisitCallNew(CallNew* node) { in VisitCallNew() argument
361 if (node->position() == position_) { in VisitCallNew()
368 if (!is_user_js_ && node->expression()->IsVariableProxy()) { in VisitCallNew()
374 Find(node->expression(), was_found); in VisitCallNew()
375 FindArguments(node->arguments()); in VisitCallNew()
383 void CallPrinter::VisitCallRuntime(CallRuntime* node) { in VisitCallRuntime() argument
384 FindArguments(node->arguments()); in VisitCallRuntime()
388 void CallPrinter::VisitUnaryOperation(UnaryOperation* node) { in VisitUnaryOperation() argument
389 Token::Value op = node->op(); in VisitUnaryOperation()
395 Find(node->expression(), true); in VisitUnaryOperation()
400 void CallPrinter::VisitCountOperation(CountOperation* node) { in VisitCountOperation() argument
402 if (node->is_prefix()) Print(Token::String(node->op())); in VisitCountOperation()
403 Find(node->expression(), true); in VisitCountOperation()
404 if (node->is_postfix()) Print(Token::String(node->op())); in VisitCountOperation()
409 void CallPrinter::VisitBinaryOperation(BinaryOperation* node) { in VisitBinaryOperation() argument
411 Find(node->left(), true); in VisitBinaryOperation()
413 Print(Token::String(node->op())); in VisitBinaryOperation()
415 Find(node->right(), true); in VisitBinaryOperation()
419 void CallPrinter::VisitNaryOperation(NaryOperation* node) { in VisitNaryOperation() argument
421 Find(node->first(), true); in VisitNaryOperation()
422 for (size_t i = 0; i < node->subsequent_length(); ++i) { in VisitNaryOperation()
424 Print(Token::String(node->op())); in VisitNaryOperation()
426 Find(node->subsequent(i), true); in VisitNaryOperation()
431 void CallPrinter::VisitCompareOperation(CompareOperation* node) { in VisitCompareOperation() argument
433 Find(node->left(), true); in VisitCompareOperation()
435 Print(Token::String(node->op())); in VisitCompareOperation()
437 Find(node->right(), true); in VisitCompareOperation()
442 void CallPrinter::VisitSpread(Spread* node) { in VisitSpread() argument
444 Find(node->expression(), true); in VisitSpread()
448 void CallPrinter::VisitStoreInArrayLiteral(StoreInArrayLiteral* node) { in VisitStoreInArrayLiteral() argument
449 Find(node->array()); in VisitStoreInArrayLiteral()
450 Find(node->index()); in VisitStoreInArrayLiteral()
451 Find(node->value()); in VisitStoreInArrayLiteral()
454 void CallPrinter::VisitEmptyParentheses(EmptyParentheses* node) { in VisitEmptyParentheses() argument
458 void CallPrinter::VisitGetIterator(GetIterator* node) { in VisitGetIterator() argument
460 if (node->position() == position_) { in VisitGetIterator()
461 is_async_iterator_error_ = node->hint() == IteratorType::kAsync; in VisitGetIterator()
468 Find(node->iterable_for_call_printer(), true); in VisitGetIterator()
475 void CallPrinter::VisitGetTemplateObject(GetTemplateObject* node) {} in VisitGetTemplateObject() argument
477 void CallPrinter::VisitTemplateLiteral(TemplateLiteral* node) { in VisitTemplateLiteral() argument
478 for (Expression* substitution : *node->substitutions()) { in VisitTemplateLiteral()
483 void CallPrinter::VisitImportCallExpression(ImportCallExpression* node) { in VisitImportCallExpression() argument
485 Find(node->argument(), true); in VisitImportCallExpression()
489 void CallPrinter::VisitThisFunction(ThisFunction* node) {} in VisitThisFunction() argument
492 void CallPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) {} in VisitSuperPropertyReference() argument
495 void CallPrinter::VisitSuperCallReference(SuperCallReference* node) { in VisitSuperCallReference() argument
500 void CallPrinter::VisitRewritableExpression(RewritableExpression* node) { in VisitRewritableExpression() argument
501 Find(node->expression()); in VisitRewritableExpression()
550 const char* AstPrinter::Print(AstNode* node) { in Print() argument
552 Visit(node); in Print()
762 void AstPrinter::PrintIndentedVisit(const char* s, AstNode* node) { in PrintIndentedVisit() argument
763 if (node != nullptr) { in PrintIndentedVisit()
764 IndentedScope indent(this, s, node->position()); in PrintIndentedVisit()
765 Visit(node); in PrintIndentedVisit()
792 void AstPrinter::PrintOut(Isolate* isolate, AstNode* node) { in PrintOut() argument
795 printer.Visit(node); in PrintOut()
829 void AstPrinter::VisitBlock(Block* node) { in VisitBlock() argument
831 node->ignore_completion_value() ? "BLOCK NOCOMPLETIONS" : "BLOCK"; in VisitBlock()
832 IndentedScope indent(this, block_txt, node->position()); in VisitBlock()
833 PrintLabelsIndented(node->labels()); in VisitBlock()
834 PrintStatements(node->statements()); in VisitBlock()
839 void AstPrinter::VisitVariableDeclaration(VariableDeclaration* node) { in VisitVariableDeclaration() argument
840 PrintLiteralWithModeIndented("VARIABLE", node->proxy()->var(), in VisitVariableDeclaration()
841 node->proxy()->raw_name()); in VisitVariableDeclaration()
846 void AstPrinter::VisitFunctionDeclaration(FunctionDeclaration* node) { in VisitFunctionDeclaration() argument
848 PrintLiteral(node->proxy()->raw_name(), true); in VisitFunctionDeclaration()
850 PrintLiteral(node->fun()->raw_name(), false); in VisitFunctionDeclaration()
855 void AstPrinter::VisitExpressionStatement(ExpressionStatement* node) { in VisitExpressionStatement() argument
856 IndentedScope indent(this, "EXPRESSION STATEMENT", node->position()); in VisitExpressionStatement()
857 Visit(node->expression()); in VisitExpressionStatement()
861 void AstPrinter::VisitEmptyStatement(EmptyStatement* node) { in VisitEmptyStatement() argument
862 IndentedScope indent(this, "EMPTY", node->position()); in VisitEmptyStatement()
867 SloppyBlockFunctionStatement* node) { in VisitSloppyBlockFunctionStatement() argument
868 Visit(node->statement()); in VisitSloppyBlockFunctionStatement()
872 void AstPrinter::VisitIfStatement(IfStatement* node) { in VisitIfStatement() argument
873 IndentedScope indent(this, "IF", node->position()); in VisitIfStatement()
874 PrintIndentedVisit("CONDITION", node->condition()); in VisitIfStatement()
875 PrintIndentedVisit("THEN", node->then_statement()); in VisitIfStatement()
876 if (node->HasElseStatement()) { in VisitIfStatement()
877 PrintIndentedVisit("ELSE", node->else_statement()); in VisitIfStatement()
882 void AstPrinter::VisitContinueStatement(ContinueStatement* node) { in VisitContinueStatement() argument
883 IndentedScope indent(this, "CONTINUE", node->position()); in VisitContinueStatement()
884 PrintLabelsIndented(node->target()->labels()); in VisitContinueStatement()
888 void AstPrinter::VisitBreakStatement(BreakStatement* node) { in VisitBreakStatement() argument
889 IndentedScope indent(this, "BREAK", node->position()); in VisitBreakStatement()
890 PrintLabelsIndented(node->target()->labels()); in VisitBreakStatement()
894 void AstPrinter::VisitReturnStatement(ReturnStatement* node) { in VisitReturnStatement() argument
895 IndentedScope indent(this, "RETURN", node->position()); in VisitReturnStatement()
896 Visit(node->expression()); in VisitReturnStatement()
900 void AstPrinter::VisitWithStatement(WithStatement* node) { in VisitWithStatement() argument
901 IndentedScope indent(this, "WITH", node->position()); in VisitWithStatement()
902 PrintIndentedVisit("OBJECT", node->expression()); in VisitWithStatement()
903 PrintIndentedVisit("BODY", node->statement()); in VisitWithStatement()
907 void AstPrinter::VisitSwitchStatement(SwitchStatement* node) { in VisitSwitchStatement() argument
908 IndentedScope indent(this, "SWITCH", node->position()); in VisitSwitchStatement()
909 PrintLabelsIndented(node->labels()); in VisitSwitchStatement()
910 PrintIndentedVisit("TAG", node->tag()); in VisitSwitchStatement()
911 for (CaseClause* clause : *node->cases()) { in VisitSwitchStatement()
924 void AstPrinter::VisitDoWhileStatement(DoWhileStatement* node) { in VisitDoWhileStatement() argument
925 IndentedScope indent(this, "DO", node->position()); in VisitDoWhileStatement()
926 PrintLabelsIndented(node->labels()); in VisitDoWhileStatement()
927 PrintLabelsIndented(node->own_labels(), "OWN "); in VisitDoWhileStatement()
928 PrintIndentedVisit("BODY", node->body()); in VisitDoWhileStatement()
929 PrintIndentedVisit("COND", node->cond()); in VisitDoWhileStatement()
933 void AstPrinter::VisitWhileStatement(WhileStatement* node) { in VisitWhileStatement() argument
934 IndentedScope indent(this, "WHILE", node->position()); in VisitWhileStatement()
935 PrintLabelsIndented(node->labels()); in VisitWhileStatement()
936 PrintLabelsIndented(node->own_labels(), "OWN "); in VisitWhileStatement()
937 PrintIndentedVisit("COND", node->cond()); in VisitWhileStatement()
938 PrintIndentedVisit("BODY", node->body()); in VisitWhileStatement()
942 void AstPrinter::VisitForStatement(ForStatement* node) { in VisitForStatement() argument
943 IndentedScope indent(this, "FOR", node->position()); in VisitForStatement()
944 PrintLabelsIndented(node->labels()); in VisitForStatement()
945 PrintLabelsIndented(node->own_labels(), "OWN "); in VisitForStatement()
946 if (node->init()) PrintIndentedVisit("INIT", node->init()); in VisitForStatement()
947 if (node->cond()) PrintIndentedVisit("COND", node->cond()); in VisitForStatement()
948 PrintIndentedVisit("BODY", node->body()); in VisitForStatement()
949 if (node->next()) PrintIndentedVisit("NEXT", node->next()); in VisitForStatement()
953 void AstPrinter::VisitForInStatement(ForInStatement* node) { in VisitForInStatement() argument
954 IndentedScope indent(this, "FOR IN", node->position()); in VisitForInStatement()
955 PrintLabelsIndented(node->labels()); in VisitForInStatement()
956 PrintLabelsIndented(node->own_labels(), "OWN "); in VisitForInStatement()
957 PrintIndentedVisit("FOR", node->each()); in VisitForInStatement()
958 PrintIndentedVisit("IN", node->enumerable()); in VisitForInStatement()
959 PrintIndentedVisit("BODY", node->body()); in VisitForInStatement()
963 void AstPrinter::VisitForOfStatement(ForOfStatement* node) { in VisitForOfStatement() argument
964 IndentedScope indent(this, "FOR OF", node->position()); in VisitForOfStatement()
965 PrintLabelsIndented(node->labels()); in VisitForOfStatement()
966 PrintLabelsIndented(node->own_labels(), "OWN "); in VisitForOfStatement()
967 PrintIndentedVisit("INIT", node->assign_iterator()); in VisitForOfStatement()
968 PrintIndentedVisit("NEXT", node->next_result()); in VisitForOfStatement()
969 PrintIndentedVisit("DONE", node->result_done()); in VisitForOfStatement()
970 PrintIndentedVisit("EACH", node->assign_each()); in VisitForOfStatement()
971 PrintIndentedVisit("BODY", node->body()); in VisitForOfStatement()
975 void AstPrinter::VisitTryCatchStatement(TryCatchStatement* node) { in VisitTryCatchStatement() argument
976 IndentedScope indent(this, "TRY CATCH", node->position()); in VisitTryCatchStatement()
977 PrintIndentedVisit("TRY", node->try_block()); in VisitTryCatchStatement()
980 switch (node->GetCatchPrediction(HandlerTable::UNCAUGHT)) { in VisitTryCatchStatement()
999 if (node->scope()) { in VisitTryCatchStatement()
1000 PrintLiteralWithModeIndented("CATCHVAR", node->scope()->catch_variable(), in VisitTryCatchStatement()
1001 node->scope()->catch_variable()->raw_name()); in VisitTryCatchStatement()
1003 PrintIndentedVisit("CATCH", node->catch_block()); in VisitTryCatchStatement()
1006 void AstPrinter::VisitTryFinallyStatement(TryFinallyStatement* node) { in VisitTryFinallyStatement() argument
1007 IndentedScope indent(this, "TRY FINALLY", node->position()); in VisitTryFinallyStatement()
1008 PrintIndentedVisit("TRY", node->try_block()); in VisitTryFinallyStatement()
1009 PrintIndentedVisit("FINALLY", node->finally_block()); in VisitTryFinallyStatement()
1012 void AstPrinter::VisitDebuggerStatement(DebuggerStatement* node) { in VisitDebuggerStatement() argument
1013 IndentedScope indent(this, "DEBUGGER", node->position()); in VisitDebuggerStatement()
1017 void AstPrinter::VisitFunctionLiteral(FunctionLiteral* node) { in VisitFunctionLiteral() argument
1018 IndentedScope indent(this, "FUNC LITERAL", node->position()); in VisitFunctionLiteral()
1019 PrintLiteralIndented("NAME", node->raw_name(), false); in VisitFunctionLiteral()
1020 PrintLiteralIndented("INFERRED NAME", node->raw_inferred_name(), false); in VisitFunctionLiteral()
1021 PrintParameters(node->scope()); in VisitFunctionLiteral()
1029 void AstPrinter::VisitClassLiteral(ClassLiteral* node) { in VisitClassLiteral() argument
1030 IndentedScope indent(this, "CLASS LITERAL", node->position()); in VisitClassLiteral()
1031 PrintLiteralIndented("NAME", node->constructor()->raw_name(), false); in VisitClassLiteral()
1032 if (node->extends() != nullptr) { in VisitClassLiteral()
1033 PrintIndentedVisit("EXTENDS", node->extends()); in VisitClassLiteral()
1035 if (node->static_fields_initializer() != nullptr) { in VisitClassLiteral()
1037 node->static_fields_initializer()); in VisitClassLiteral()
1039 if (node->instance_fields_initializer_function() != nullptr) { in VisitClassLiteral()
1041 node->instance_fields_initializer_function()); in VisitClassLiteral()
1043 PrintClassProperties(node->properties()); in VisitClassLiteral()
1047 InitializeClassFieldsStatement* node) { in VisitInitializeClassFieldsStatement() argument
1048 IndentedScope indent(this, "INITIALIZE CLASS FIELDS", node->position()); in VisitInitializeClassFieldsStatement()
1049 PrintClassProperties(node->fields()); in VisitInitializeClassFieldsStatement()
1084 void AstPrinter::VisitNativeFunctionLiteral(NativeFunctionLiteral* node) { in VisitNativeFunctionLiteral() argument
1085 IndentedScope indent(this, "NATIVE FUNC LITERAL", node->position()); in VisitNativeFunctionLiteral()
1086 PrintLiteralIndented("NAME", node->raw_name(), false); in VisitNativeFunctionLiteral()
1090 void AstPrinter::VisitDoExpression(DoExpression* node) { in VisitDoExpression() argument
1091 IndentedScope indent(this, "DO EXPRESSION", node->position()); in VisitDoExpression()
1092 PrintStatements(node->block()->statements()); in VisitDoExpression()
1096 void AstPrinter::VisitConditional(Conditional* node) { in VisitConditional() argument
1097 IndentedScope indent(this, "CONDITIONAL", node->position()); in VisitConditional()
1098 PrintIndentedVisit("CONDITION", node->condition()); in VisitConditional()
1099 PrintIndentedVisit("THEN", node->then_expression()); in VisitConditional()
1100 PrintIndentedVisit("ELSE", node->else_expression()); in VisitConditional()
1104 void AstPrinter::VisitLiteral(Literal* node) { in VisitLiteral() argument
1105 PrintLiteralIndented("LITERAL", node, true); in VisitLiteral()
1109 void AstPrinter::VisitRegExpLiteral(RegExpLiteral* node) { in VisitRegExpLiteral() argument
1110 IndentedScope indent(this, "REGEXP LITERAL", node->position()); in VisitRegExpLiteral()
1111 PrintLiteralIndented("PATTERN", node->raw_pattern(), false); in VisitRegExpLiteral()
1114 if (node->flags() & RegExp::kGlobal) buf[i++] = 'g'; in VisitRegExpLiteral()
1115 if (node->flags() & RegExp::kIgnoreCase) buf[i++] = 'i'; in VisitRegExpLiteral()
1116 if (node->flags() & RegExp::kMultiline) buf[i++] = 'm'; in VisitRegExpLiteral()
1117 if (node->flags() & RegExp::kUnicode) buf[i++] = 'u'; in VisitRegExpLiteral()
1118 if (node->flags() & RegExp::kSticky) buf[i++] = 'y'; in VisitRegExpLiteral()
1126 void AstPrinter::VisitObjectLiteral(ObjectLiteral* node) { in VisitObjectLiteral() argument
1127 IndentedScope indent(this, "OBJ LITERAL", node->position()); in VisitObjectLiteral()
1128 PrintObjectProperties(node->properties()); in VisitObjectLiteral()
1168 void AstPrinter::VisitArrayLiteral(ArrayLiteral* node) { in VisitArrayLiteral() argument
1169 IndentedScope indent(this, "ARRAY LITERAL", node->position()); in VisitArrayLiteral()
1170 if (node->values()->length() > 0) { in VisitArrayLiteral()
1171 IndentedScope indent(this, "VALUES", node->position()); in VisitArrayLiteral()
1172 for (int i = 0; i < node->values()->length(); i++) { in VisitArrayLiteral()
1173 Visit(node->values()->at(i)); in VisitArrayLiteral()
1179 void AstPrinter::VisitVariableProxy(VariableProxy* node) { in VisitVariableProxy() argument
1183 if (!node->is_resolved()) { in VisitVariableProxy()
1185 PrintLiteralWithModeIndented(buf.start(), nullptr, node->raw_name()); in VisitVariableProxy()
1187 Variable* var = node->var(); in VisitVariableProxy()
1208 PrintLiteralWithModeIndented(buf.start(), var, node->raw_name()); in VisitVariableProxy()
1213 void AstPrinter::VisitAssignment(Assignment* node) { in VisitAssignment() argument
1214 IndentedScope indent(this, Token::Name(node->op()), node->position()); in VisitAssignment()
1215 Visit(node->target()); in VisitAssignment()
1216 Visit(node->value()); in VisitAssignment()
1219 void AstPrinter::VisitCompoundAssignment(CompoundAssignment* node) { in VisitCompoundAssignment() argument
1220 VisitAssignment(node); in VisitCompoundAssignment()
1223 void AstPrinter::VisitYield(Yield* node) { in VisitYield() argument
1226 IndentedScope indent(this, buf.start(), node->position()); in VisitYield()
1227 Visit(node->expression()); in VisitYield()
1230 void AstPrinter::VisitYieldStar(YieldStar* node) { in VisitYieldStar() argument
1233 IndentedScope indent(this, buf.start(), node->position()); in VisitYieldStar()
1234 Visit(node->expression()); in VisitYieldStar()
1237 void AstPrinter::VisitAwait(Await* node) { in VisitAwait() argument
1240 IndentedScope indent(this, buf.start(), node->position()); in VisitAwait()
1241 Visit(node->expression()); in VisitAwait()
1244 void AstPrinter::VisitThrow(Throw* node) { in VisitThrow() argument
1245 IndentedScope indent(this, "THROW", node->position()); in VisitThrow()
1246 Visit(node->exception()); in VisitThrow()
1249 void AstPrinter::VisitProperty(Property* node) { in VisitProperty() argument
1252 IndentedScope indent(this, buf.start(), node->position()); in VisitProperty()
1254 Visit(node->obj()); in VisitProperty()
1255 LhsKind property_kind = Property::GetAssignType(node); in VisitProperty()
1258 PrintLiteralIndented("NAME", node->key()->AsLiteral(), false); in VisitProperty()
1262 PrintIndentedVisit("KEY", node->key()); in VisitProperty()
1266 void AstPrinter::VisitResolvedProperty(ResolvedProperty* node) { in VisitResolvedProperty() argument
1269 IndentedScope indent(this, buf.start(), node->position()); in VisitResolvedProperty()
1271 PrintIndentedVisit("RECEIVER", node->object()); in VisitResolvedProperty()
1272 PrintIndentedVisit("PROPERTY", node->property()); in VisitResolvedProperty()
1275 void AstPrinter::VisitCall(Call* node) { in VisitCall() argument
1280 Visit(node->expression()); in VisitCall()
1281 PrintArguments(node->arguments()); in VisitCall()
1285 void AstPrinter::VisitCallNew(CallNew* node) { in VisitCallNew() argument
1286 IndentedScope indent(this, "CALL NEW", node->position()); in VisitCallNew()
1287 Visit(node->expression()); in VisitCallNew()
1288 PrintArguments(node->arguments()); in VisitCallNew()
1292 void AstPrinter::VisitCallRuntime(CallRuntime* node) { in VisitCallRuntime() argument
1294 SNPrintF(buf, "CALL RUNTIME %s%s", node->debug_name(), in VisitCallRuntime()
1295 node->is_jsruntime() ? " (JS function)" : ""); in VisitCallRuntime()
1296 IndentedScope indent(this, buf.start(), node->position()); in VisitCallRuntime()
1297 PrintArguments(node->arguments()); in VisitCallRuntime()
1301 void AstPrinter::VisitUnaryOperation(UnaryOperation* node) { in VisitUnaryOperation() argument
1302 IndentedScope indent(this, Token::Name(node->op()), node->position()); in VisitUnaryOperation()
1303 Visit(node->expression()); in VisitUnaryOperation()
1307 void AstPrinter::VisitCountOperation(CountOperation* node) { in VisitCountOperation() argument
1309 SNPrintF(buf, "%s %s", (node->is_prefix() ? "PRE" : "POST"), in VisitCountOperation()
1310 Token::Name(node->op())); in VisitCountOperation()
1311 IndentedScope indent(this, buf.start(), node->position()); in VisitCountOperation()
1312 Visit(node->expression()); in VisitCountOperation()
1316 void AstPrinter::VisitBinaryOperation(BinaryOperation* node) { in VisitBinaryOperation() argument
1317 IndentedScope indent(this, Token::Name(node->op()), node->position()); in VisitBinaryOperation()
1318 Visit(node->left()); in VisitBinaryOperation()
1319 Visit(node->right()); in VisitBinaryOperation()
1322 void AstPrinter::VisitNaryOperation(NaryOperation* node) { in VisitNaryOperation() argument
1323 IndentedScope indent(this, Token::Name(node->op()), node->position()); in VisitNaryOperation()
1324 Visit(node->first()); in VisitNaryOperation()
1325 for (size_t i = 0; i < node->subsequent_length(); ++i) { in VisitNaryOperation()
1326 Visit(node->subsequent(i)); in VisitNaryOperation()
1330 void AstPrinter::VisitCompareOperation(CompareOperation* node) { in VisitCompareOperation() argument
1331 IndentedScope indent(this, Token::Name(node->op()), node->position()); in VisitCompareOperation()
1332 Visit(node->left()); in VisitCompareOperation()
1333 Visit(node->right()); in VisitCompareOperation()
1337 void AstPrinter::VisitSpread(Spread* node) { in VisitSpread() argument
1338 IndentedScope indent(this, "SPREAD", node->position()); in VisitSpread()
1339 Visit(node->expression()); in VisitSpread()
1342 void AstPrinter::VisitStoreInArrayLiteral(StoreInArrayLiteral* node) { in VisitStoreInArrayLiteral() argument
1343 IndentedScope indent(this, "STORE IN ARRAY LITERAL", node->position()); in VisitStoreInArrayLiteral()
1344 PrintIndentedVisit("ARRAY", node->array()); in VisitStoreInArrayLiteral()
1345 PrintIndentedVisit("INDEX", node->index()); in VisitStoreInArrayLiteral()
1346 PrintIndentedVisit("VALUE", node->value()); in VisitStoreInArrayLiteral()
1349 void AstPrinter::VisitEmptyParentheses(EmptyParentheses* node) { in VisitEmptyParentheses() argument
1350 IndentedScope indent(this, "()", node->position()); in VisitEmptyParentheses()
1353 void AstPrinter::VisitGetIterator(GetIterator* node) { in VisitGetIterator() argument
1354 IndentedScope indent(this, "GET-ITERATOR", node->position()); in VisitGetIterator()
1355 Visit(node->iterable()); in VisitGetIterator()
1358 void AstPrinter::VisitGetTemplateObject(GetTemplateObject* node) { in VisitGetTemplateObject() argument
1359 IndentedScope indent(this, "GET-TEMPLATE-OBJECT", node->position()); in VisitGetTemplateObject()
1362 void AstPrinter::VisitTemplateLiteral(TemplateLiteral* node) { in VisitTemplateLiteral() argument
1363 IndentedScope indent(this, "TEMPLATE-LITERAL", node->position()); in VisitTemplateLiteral()
1364 const AstRawString* string = node->string_parts()->first(); in VisitTemplateLiteral()
1366 for (int i = 0; i < node->substitutions()->length();) { in VisitTemplateLiteral()
1367 PrintIndentedVisit("EXPR", node->substitutions()->at(i++)); in VisitTemplateLiteral()
1368 if (i < node->string_parts()->length()) { in VisitTemplateLiteral()
1369 string = node->string_parts()->at(i); in VisitTemplateLiteral()
1375 void AstPrinter::VisitImportCallExpression(ImportCallExpression* node) { in VisitImportCallExpression() argument
1376 IndentedScope indent(this, "IMPORT-CALL", node->position()); in VisitImportCallExpression()
1377 Visit(node->argument()); in VisitImportCallExpression()
1380 void AstPrinter::VisitThisFunction(ThisFunction* node) { in VisitThisFunction() argument
1381 IndentedScope indent(this, "THIS-FUNCTION", node->position()); in VisitThisFunction()
1385 void AstPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) { in VisitSuperPropertyReference() argument
1386 IndentedScope indent(this, "SUPER-PROPERTY-REFERENCE", node->position()); in VisitSuperPropertyReference()
1390 void AstPrinter::VisitSuperCallReference(SuperCallReference* node) { in VisitSuperCallReference() argument
1391 IndentedScope indent(this, "SUPER-CALL-REFERENCE", node->position()); in VisitSuperCallReference()
1395 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { in VisitRewritableExpression() argument
1396 Visit(node->expression()); in VisitRewritableExpression()