Lines Matching refs:node
16 #define REWRITE_THIS(node) \ argument
18 if (!RewriteExpression(node)) return; \
54 VariableDeclaration* node) { in VisitVariableDeclaration() argument
61 FunctionDeclaration* node) { in VisitFunctionDeclaration() argument
63 AST_REWRITE_PROPERTY(FunctionLiteral, node, fun); in VisitFunctionDeclaration()
67 void AstExpressionRewriter::VisitImportDeclaration(ImportDeclaration* node) { in VisitImportDeclaration() argument
73 void AstExpressionRewriter::VisitExportDeclaration(ExportDeclaration* node) { in VisitExportDeclaration() argument
79 void AstExpressionRewriter::VisitBlock(Block* node) { in VisitBlock() argument
80 VisitStatements(node->statements()); in VisitBlock()
85 ExpressionStatement* node) { in VisitExpressionStatement() argument
86 AST_REWRITE_PROPERTY(Expression, node, expression); in VisitExpressionStatement()
90 void AstExpressionRewriter::VisitEmptyStatement(EmptyStatement* node) { in VisitEmptyStatement() argument
96 SloppyBlockFunctionStatement* node) { in VisitSloppyBlockFunctionStatement() argument
97 AST_REWRITE_PROPERTY(Statement, node, statement); in VisitSloppyBlockFunctionStatement()
101 void AstExpressionRewriter::VisitIfStatement(IfStatement* node) { in VisitIfStatement() argument
102 AST_REWRITE_PROPERTY(Expression, node, condition); in VisitIfStatement()
103 AST_REWRITE_PROPERTY(Statement, node, then_statement); in VisitIfStatement()
104 AST_REWRITE_PROPERTY(Statement, node, else_statement); in VisitIfStatement()
108 void AstExpressionRewriter::VisitContinueStatement(ContinueStatement* node) { in VisitContinueStatement() argument
113 void AstExpressionRewriter::VisitBreakStatement(BreakStatement* node) { in VisitBreakStatement() argument
118 void AstExpressionRewriter::VisitReturnStatement(ReturnStatement* node) { in VisitReturnStatement() argument
119 AST_REWRITE_PROPERTY(Expression, node, expression); in VisitReturnStatement()
123 void AstExpressionRewriter::VisitWithStatement(WithStatement* node) { in VisitWithStatement() argument
124 AST_REWRITE_PROPERTY(Expression, node, expression); in VisitWithStatement()
125 AST_REWRITE_PROPERTY(Statement, node, statement); in VisitWithStatement()
129 void AstExpressionRewriter::VisitSwitchStatement(SwitchStatement* node) { in VisitSwitchStatement() argument
130 AST_REWRITE_PROPERTY(Expression, node, tag); in VisitSwitchStatement()
131 ZoneList<CaseClause*>* clauses = node->cases(); in VisitSwitchStatement()
138 void AstExpressionRewriter::VisitDoWhileStatement(DoWhileStatement* node) { in VisitDoWhileStatement() argument
139 AST_REWRITE_PROPERTY(Expression, node, cond); in VisitDoWhileStatement()
140 AST_REWRITE_PROPERTY(Statement, node, body); in VisitDoWhileStatement()
144 void AstExpressionRewriter::VisitWhileStatement(WhileStatement* node) { in VisitWhileStatement() argument
145 AST_REWRITE_PROPERTY(Expression, node, cond); in VisitWhileStatement()
146 AST_REWRITE_PROPERTY(Statement, node, body); in VisitWhileStatement()
150 void AstExpressionRewriter::VisitForStatement(ForStatement* node) { in VisitForStatement() argument
151 if (node->init() != nullptr) { in VisitForStatement()
152 AST_REWRITE_PROPERTY(Statement, node, init); in VisitForStatement()
154 if (node->cond() != nullptr) { in VisitForStatement()
155 AST_REWRITE_PROPERTY(Expression, node, cond); in VisitForStatement()
157 if (node->next() != nullptr) { in VisitForStatement()
158 AST_REWRITE_PROPERTY(Statement, node, next); in VisitForStatement()
160 AST_REWRITE_PROPERTY(Statement, node, body); in VisitForStatement()
164 void AstExpressionRewriter::VisitForInStatement(ForInStatement* node) { in VisitForInStatement() argument
165 AST_REWRITE_PROPERTY(Expression, node, each); in VisitForInStatement()
166 AST_REWRITE_PROPERTY(Expression, node, subject); in VisitForInStatement()
167 AST_REWRITE_PROPERTY(Statement, node, body); in VisitForInStatement()
171 void AstExpressionRewriter::VisitForOfStatement(ForOfStatement* node) { in VisitForOfStatement() argument
172 AST_REWRITE_PROPERTY(Expression, node, each); in VisitForOfStatement()
173 AST_REWRITE_PROPERTY(Expression, node, assign_iterator); in VisitForOfStatement()
174 AST_REWRITE_PROPERTY(Expression, node, next_result); in VisitForOfStatement()
175 AST_REWRITE_PROPERTY(Expression, node, result_done); in VisitForOfStatement()
176 AST_REWRITE_PROPERTY(Expression, node, assign_each); in VisitForOfStatement()
177 AST_REWRITE_PROPERTY(Expression, node, subject); in VisitForOfStatement()
178 AST_REWRITE_PROPERTY(Statement, node, body); in VisitForOfStatement()
182 void AstExpressionRewriter::VisitTryCatchStatement(TryCatchStatement* node) { in VisitTryCatchStatement() argument
183 AST_REWRITE_PROPERTY(Block, node, try_block); in VisitTryCatchStatement()
185 AST_REWRITE_PROPERTY(Block, node, catch_block); in VisitTryCatchStatement()
190 TryFinallyStatement* node) { in VisitTryFinallyStatement() argument
191 AST_REWRITE_PROPERTY(Block, node, try_block); in VisitTryFinallyStatement()
192 AST_REWRITE_PROPERTY(Block, node, finally_block); in VisitTryFinallyStatement()
196 void AstExpressionRewriter::VisitDebuggerStatement(DebuggerStatement* node) { in VisitDebuggerStatement() argument
201 void AstExpressionRewriter::VisitFunctionLiteral(FunctionLiteral* node) { in VisitFunctionLiteral() argument
202 REWRITE_THIS(node); in VisitFunctionLiteral()
203 VisitDeclarations(node->scope()->declarations()); in VisitFunctionLiteral()
204 ZoneList<Statement*>* body = node->body(); in VisitFunctionLiteral()
209 void AstExpressionRewriter::VisitClassLiteral(ClassLiteral* node) { in VisitClassLiteral() argument
210 REWRITE_THIS(node); in VisitClassLiteral()
212 if (node->extends() != nullptr) { in VisitClassLiteral()
213 AST_REWRITE_PROPERTY(Expression, node, extends); in VisitClassLiteral()
215 AST_REWRITE_PROPERTY(FunctionLiteral, node, constructor); in VisitClassLiteral()
216 ZoneList<typename ClassLiteral::Property*>* properties = node->properties(); in VisitClassLiteral()
224 NativeFunctionLiteral* node) { in VisitNativeFunctionLiteral() argument
225 REWRITE_THIS(node); in VisitNativeFunctionLiteral()
230 void AstExpressionRewriter::VisitConditional(Conditional* node) { in VisitConditional() argument
231 REWRITE_THIS(node); in VisitConditional()
232 AST_REWRITE_PROPERTY(Expression, node, condition); in VisitConditional()
233 AST_REWRITE_PROPERTY(Expression, node, then_expression); in VisitConditional()
234 AST_REWRITE_PROPERTY(Expression, node, else_expression); in VisitConditional()
238 void AstExpressionRewriter::VisitVariableProxy(VariableProxy* node) { in VisitVariableProxy() argument
239 REWRITE_THIS(node); in VisitVariableProxy()
244 void AstExpressionRewriter::VisitLiteral(Literal* node) { in VisitLiteral() argument
245 REWRITE_THIS(node); in VisitLiteral()
250 void AstExpressionRewriter::VisitRegExpLiteral(RegExpLiteral* node) { in VisitRegExpLiteral() argument
251 REWRITE_THIS(node); in VisitRegExpLiteral()
256 void AstExpressionRewriter::VisitObjectLiteral(ObjectLiteral* node) { in VisitObjectLiteral() argument
257 REWRITE_THIS(node); in VisitObjectLiteral()
258 ZoneList<typename ObjectLiteral::Property*>* properties = node->properties(); in VisitObjectLiteral()
273 void AstExpressionRewriter::VisitArrayLiteral(ArrayLiteral* node) { in VisitArrayLiteral() argument
274 REWRITE_THIS(node); in VisitArrayLiteral()
275 VisitExpressions(node->values()); in VisitArrayLiteral()
279 void AstExpressionRewriter::VisitAssignment(Assignment* node) { in VisitAssignment() argument
280 REWRITE_THIS(node); in VisitAssignment()
281 AST_REWRITE_PROPERTY(Expression, node, target); in VisitAssignment()
282 AST_REWRITE_PROPERTY(Expression, node, value); in VisitAssignment()
286 void AstExpressionRewriter::VisitYield(Yield* node) { in VisitYield() argument
287 REWRITE_THIS(node); in VisitYield()
288 AST_REWRITE_PROPERTY(Expression, node, generator_object); in VisitYield()
289 AST_REWRITE_PROPERTY(Expression, node, expression); in VisitYield()
293 void AstExpressionRewriter::VisitThrow(Throw* node) { in VisitThrow() argument
294 REWRITE_THIS(node); in VisitThrow()
295 AST_REWRITE_PROPERTY(Expression, node, exception); in VisitThrow()
299 void AstExpressionRewriter::VisitProperty(Property* node) { in VisitProperty() argument
300 REWRITE_THIS(node); in VisitProperty()
301 if (node == nullptr) return; in VisitProperty()
302 AST_REWRITE_PROPERTY(Expression, node, obj); in VisitProperty()
303 AST_REWRITE_PROPERTY(Expression, node, key); in VisitProperty()
307 void AstExpressionRewriter::VisitCall(Call* node) { in VisitCall() argument
308 REWRITE_THIS(node); in VisitCall()
309 AST_REWRITE_PROPERTY(Expression, node, expression); in VisitCall()
310 VisitExpressions(node->arguments()); in VisitCall()
314 void AstExpressionRewriter::VisitCallNew(CallNew* node) { in VisitCallNew() argument
315 REWRITE_THIS(node); in VisitCallNew()
316 AST_REWRITE_PROPERTY(Expression, node, expression); in VisitCallNew()
317 VisitExpressions(node->arguments()); in VisitCallNew()
321 void AstExpressionRewriter::VisitCallRuntime(CallRuntime* node) { in VisitCallRuntime() argument
322 REWRITE_THIS(node); in VisitCallRuntime()
323 VisitExpressions(node->arguments()); in VisitCallRuntime()
327 void AstExpressionRewriter::VisitUnaryOperation(UnaryOperation* node) { in VisitUnaryOperation() argument
328 REWRITE_THIS(node); in VisitUnaryOperation()
329 AST_REWRITE_PROPERTY(Expression, node, expression); in VisitUnaryOperation()
333 void AstExpressionRewriter::VisitCountOperation(CountOperation* node) { in VisitCountOperation() argument
334 REWRITE_THIS(node); in VisitCountOperation()
335 AST_REWRITE_PROPERTY(Expression, node, expression); in VisitCountOperation()
339 void AstExpressionRewriter::VisitBinaryOperation(BinaryOperation* node) { in VisitBinaryOperation() argument
340 REWRITE_THIS(node); in VisitBinaryOperation()
341 AST_REWRITE_PROPERTY(Expression, node, left); in VisitBinaryOperation()
342 AST_REWRITE_PROPERTY(Expression, node, right); in VisitBinaryOperation()
346 void AstExpressionRewriter::VisitCompareOperation(CompareOperation* node) { in VisitCompareOperation() argument
347 REWRITE_THIS(node); in VisitCompareOperation()
348 AST_REWRITE_PROPERTY(Expression, node, left); in VisitCompareOperation()
349 AST_REWRITE_PROPERTY(Expression, node, right); in VisitCompareOperation()
353 void AstExpressionRewriter::VisitSpread(Spread* node) { in VisitSpread() argument
354 REWRITE_THIS(node); in VisitSpread()
355 AST_REWRITE_PROPERTY(Expression, node, expression); in VisitSpread()
359 void AstExpressionRewriter::VisitThisFunction(ThisFunction* node) { in VisitThisFunction() argument
360 REWRITE_THIS(node); in VisitThisFunction()
366 SuperPropertyReference* node) { in VisitSuperPropertyReference() argument
367 REWRITE_THIS(node); in VisitSuperPropertyReference()
368 AST_REWRITE_PROPERTY(VariableProxy, node, this_var); in VisitSuperPropertyReference()
369 AST_REWRITE_PROPERTY(Expression, node, home_object); in VisitSuperPropertyReference()
373 void AstExpressionRewriter::VisitSuperCallReference(SuperCallReference* node) { in VisitSuperCallReference() argument
374 REWRITE_THIS(node); in VisitSuperCallReference()
375 AST_REWRITE_PROPERTY(VariableProxy, node, this_var); in VisitSuperCallReference()
376 AST_REWRITE_PROPERTY(VariableProxy, node, new_target_var); in VisitSuperCallReference()
377 AST_REWRITE_PROPERTY(VariableProxy, node, this_function_var); in VisitSuperCallReference()
381 void AstExpressionRewriter::VisitCaseClause(CaseClause* node) { in VisitCaseClause() argument
382 if (!node->is_default()) { in VisitCaseClause()
383 AST_REWRITE_PROPERTY(Expression, node, label); in VisitCaseClause()
385 VisitStatements(node->statements()); in VisitCaseClause()
389 void AstExpressionRewriter::VisitEmptyParentheses(EmptyParentheses* node) { in VisitEmptyParentheses() argument
394 void AstExpressionRewriter::VisitDoExpression(DoExpression* node) { in VisitDoExpression() argument
395 REWRITE_THIS(node); in VisitDoExpression()
396 AST_REWRITE_PROPERTY(Block, node, block); in VisitDoExpression()
397 AST_REWRITE_PROPERTY(VariableProxy, node, result); in VisitDoExpression()
402 RewritableAssignmentExpression* node) { in VisitRewritableAssignmentExpression() argument
403 REWRITE_THIS(node); in VisitRewritableAssignmentExpression()
404 AST_REWRITE_PROPERTY(Expression, node, expression); in VisitRewritableAssignmentExpression()