Lines Matching refs:node

26   bool Renumber(FunctionLiteral* node);
30 #define DEFINE_VISIT(type) void Visit##type(type* node) override;
34 bool Finish(FunctionLiteral* node);
36 void VisitVariableProxyReference(VariableProxy* node);
37 void VisitPropertyReference(Property* node);
69 void ReserveFeedbackSlots(Node* node) { in ReserveFeedbackSlots() argument
70 node->AssignFeedbackVectorSlots(isolate_, properties_.get_spec(), in ReserveFeedbackSlots()
89 void AstNumberingVisitor::VisitVariableDeclaration(VariableDeclaration* node) { in VisitVariableDeclaration() argument
91 VisitVariableProxy(node->proxy()); in VisitVariableDeclaration()
95 void AstNumberingVisitor::VisitExportDeclaration(ExportDeclaration* node) { in VisitExportDeclaration() argument
98 VisitVariableProxy(node->proxy()); in VisitExportDeclaration()
102 void AstNumberingVisitor::VisitEmptyStatement(EmptyStatement* node) { in VisitEmptyStatement() argument
108 SloppyBlockFunctionStatement* node) { in VisitSloppyBlockFunctionStatement() argument
110 Visit(node->statement()); in VisitSloppyBlockFunctionStatement()
114 void AstNumberingVisitor::VisitContinueStatement(ContinueStatement* node) { in VisitContinueStatement() argument
119 void AstNumberingVisitor::VisitBreakStatement(BreakStatement* node) { in VisitBreakStatement() argument
124 void AstNumberingVisitor::VisitDebuggerStatement(DebuggerStatement* node) { in VisitDebuggerStatement() argument
127 node->set_base_id(ReserveIdRange(DebuggerStatement::num_ids())); in VisitDebuggerStatement()
132 NativeFunctionLiteral* node) { in VisitNativeFunctionLiteral() argument
135 node->set_base_id(ReserveIdRange(NativeFunctionLiteral::num_ids())); in VisitNativeFunctionLiteral()
139 void AstNumberingVisitor::VisitDoExpression(DoExpression* node) { in VisitDoExpression() argument
142 node->set_base_id(ReserveIdRange(DoExpression::num_ids())); in VisitDoExpression()
143 Visit(node->block()); in VisitDoExpression()
144 Visit(node->result()); in VisitDoExpression()
148 void AstNumberingVisitor::VisitLiteral(Literal* node) { in VisitLiteral() argument
150 node->set_base_id(ReserveIdRange(Literal::num_ids())); in VisitLiteral()
154 void AstNumberingVisitor::VisitRegExpLiteral(RegExpLiteral* node) { in VisitRegExpLiteral() argument
156 node->set_base_id(ReserveIdRange(RegExpLiteral::num_ids())); in VisitRegExpLiteral()
160 void AstNumberingVisitor::VisitVariableProxyReference(VariableProxy* node) { in VisitVariableProxyReference() argument
162 if (node->var()->IsLookupSlot()) { in VisitVariableProxyReference()
165 node->set_base_id(ReserveIdRange(VariableProxy::num_ids())); in VisitVariableProxyReference()
169 void AstNumberingVisitor::VisitVariableProxy(VariableProxy* node) { in VisitVariableProxy() argument
170 VisitVariableProxyReference(node); in VisitVariableProxy()
171 ReserveFeedbackSlots(node); in VisitVariableProxy()
175 void AstNumberingVisitor::VisitThisFunction(ThisFunction* node) { in VisitThisFunction() argument
177 node->set_base_id(ReserveIdRange(ThisFunction::num_ids())); in VisitThisFunction()
182 SuperPropertyReference* node) { in VisitSuperPropertyReference() argument
185 node->set_base_id(ReserveIdRange(SuperPropertyReference::num_ids())); in VisitSuperPropertyReference()
186 Visit(node->this_var()); in VisitSuperPropertyReference()
187 Visit(node->home_object()); in VisitSuperPropertyReference()
191 void AstNumberingVisitor::VisitSuperCallReference(SuperCallReference* node) { in VisitSuperCallReference() argument
194 node->set_base_id(ReserveIdRange(SuperCallReference::num_ids())); in VisitSuperCallReference()
195 Visit(node->this_var()); in VisitSuperCallReference()
196 Visit(node->new_target_var()); in VisitSuperCallReference()
197 Visit(node->this_function_var()); in VisitSuperCallReference()
201 void AstNumberingVisitor::VisitImportDeclaration(ImportDeclaration* node) { in VisitImportDeclaration() argument
204 VisitVariableProxy(node->proxy()); in VisitImportDeclaration()
208 void AstNumberingVisitor::VisitExpressionStatement(ExpressionStatement* node) { in VisitExpressionStatement() argument
210 Visit(node->expression()); in VisitExpressionStatement()
214 void AstNumberingVisitor::VisitReturnStatement(ReturnStatement* node) { in VisitReturnStatement() argument
216 Visit(node->expression()); in VisitReturnStatement()
220 void AstNumberingVisitor::VisitYield(Yield* node) { in VisitYield() argument
223 ReserveFeedbackSlots(node); in VisitYield()
224 node->set_base_id(ReserveIdRange(Yield::num_ids())); in VisitYield()
225 Visit(node->generator_object()); in VisitYield()
226 Visit(node->expression()); in VisitYield()
230 void AstNumberingVisitor::VisitThrow(Throw* node) { in VisitThrow() argument
232 node->set_base_id(ReserveIdRange(Throw::num_ids())); in VisitThrow()
233 Visit(node->exception()); in VisitThrow()
237 void AstNumberingVisitor::VisitUnaryOperation(UnaryOperation* node) { in VisitUnaryOperation() argument
239 node->set_base_id(ReserveIdRange(UnaryOperation::num_ids())); in VisitUnaryOperation()
240 Visit(node->expression()); in VisitUnaryOperation()
244 void AstNumberingVisitor::VisitCountOperation(CountOperation* node) { in VisitCountOperation() argument
246 node->set_base_id(ReserveIdRange(CountOperation::num_ids())); in VisitCountOperation()
247 Visit(node->expression()); in VisitCountOperation()
248 ReserveFeedbackSlots(node); in VisitCountOperation()
252 void AstNumberingVisitor::VisitBlock(Block* node) { in VisitBlock() argument
254 node->set_base_id(ReserveIdRange(Block::num_ids())); in VisitBlock()
255 if (node->scope() != NULL) VisitDeclarations(node->scope()->declarations()); in VisitBlock()
256 VisitStatements(node->statements()); in VisitBlock()
260 void AstNumberingVisitor::VisitFunctionDeclaration(FunctionDeclaration* node) { in VisitFunctionDeclaration() argument
262 VisitVariableProxy(node->proxy()); in VisitFunctionDeclaration()
263 VisitFunctionLiteral(node->fun()); in VisitFunctionDeclaration()
267 void AstNumberingVisitor::VisitCallRuntime(CallRuntime* node) { in VisitCallRuntime() argument
269 ReserveFeedbackSlots(node); in VisitCallRuntime()
270 if (node->is_jsruntime()) { in VisitCallRuntime()
274 node->set_base_id(ReserveIdRange(CallRuntime::num_ids())); in VisitCallRuntime()
275 VisitArguments(node->arguments()); in VisitCallRuntime()
279 void AstNumberingVisitor::VisitWithStatement(WithStatement* node) { in VisitWithStatement() argument
282 node->set_base_id(ReserveIdRange(WithStatement::num_ids())); in VisitWithStatement()
283 Visit(node->expression()); in VisitWithStatement()
284 Visit(node->statement()); in VisitWithStatement()
288 void AstNumberingVisitor::VisitDoWhileStatement(DoWhileStatement* node) { in VisitDoWhileStatement() argument
291 node->set_base_id(ReserveIdRange(DoWhileStatement::num_ids())); in VisitDoWhileStatement()
292 Visit(node->body()); in VisitDoWhileStatement()
293 Visit(node->cond()); in VisitDoWhileStatement()
297 void AstNumberingVisitor::VisitWhileStatement(WhileStatement* node) { in VisitWhileStatement() argument
300 node->set_base_id(ReserveIdRange(WhileStatement::num_ids())); in VisitWhileStatement()
301 Visit(node->cond()); in VisitWhileStatement()
302 Visit(node->body()); in VisitWhileStatement()
306 void AstNumberingVisitor::VisitTryCatchStatement(TryCatchStatement* node) { in VisitTryCatchStatement() argument
309 node->set_base_id(ReserveIdRange(TryCatchStatement::num_ids())); in VisitTryCatchStatement()
310 Visit(node->try_block()); in VisitTryCatchStatement()
311 Visit(node->catch_block()); in VisitTryCatchStatement()
315 void AstNumberingVisitor::VisitTryFinallyStatement(TryFinallyStatement* node) { in VisitTryFinallyStatement() argument
318 node->set_base_id(ReserveIdRange(TryFinallyStatement::num_ids())); in VisitTryFinallyStatement()
319 Visit(node->try_block()); in VisitTryFinallyStatement()
320 Visit(node->finally_block()); in VisitTryFinallyStatement()
324 void AstNumberingVisitor::VisitPropertyReference(Property* node) { in VisitPropertyReference() argument
326 node->set_base_id(ReserveIdRange(Property::num_ids())); in VisitPropertyReference()
327 Visit(node->key()); in VisitPropertyReference()
328 Visit(node->obj()); in VisitPropertyReference()
342 void AstNumberingVisitor::VisitProperty(Property* node) { in VisitProperty() argument
343 VisitPropertyReference(node); in VisitProperty()
344 ReserveFeedbackSlots(node); in VisitProperty()
348 void AstNumberingVisitor::VisitAssignment(Assignment* node) { in VisitAssignment() argument
350 node->set_base_id(ReserveIdRange(Assignment::num_ids())); in VisitAssignment()
352 if (node->is_compound()) VisitBinaryOperation(node->binary_operation()); in VisitAssignment()
353 VisitReference(node->target()); in VisitAssignment()
354 Visit(node->value()); in VisitAssignment()
355 ReserveFeedbackSlots(node); in VisitAssignment()
359 void AstNumberingVisitor::VisitBinaryOperation(BinaryOperation* node) { in VisitBinaryOperation() argument
361 node->set_base_id(ReserveIdRange(BinaryOperation::num_ids())); in VisitBinaryOperation()
362 Visit(node->left()); in VisitBinaryOperation()
363 Visit(node->right()); in VisitBinaryOperation()
367 void AstNumberingVisitor::VisitCompareOperation(CompareOperation* node) { in VisitCompareOperation() argument
369 node->set_base_id(ReserveIdRange(CompareOperation::num_ids())); in VisitCompareOperation()
370 Visit(node->left()); in VisitCompareOperation()
371 Visit(node->right()); in VisitCompareOperation()
375 void AstNumberingVisitor::VisitSpread(Spread* node) { in VisitSpread() argument
378 Visit(node->expression()); in VisitSpread()
382 void AstNumberingVisitor::VisitEmptyParentheses(EmptyParentheses* node) { in VisitEmptyParentheses() argument
387 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { in VisitForInStatement() argument
390 node->set_base_id(ReserveIdRange(ForInStatement::num_ids())); in VisitForInStatement()
391 Visit(node->each()); in VisitForInStatement()
392 Visit(node->enumerable()); in VisitForInStatement()
393 Visit(node->body()); in VisitForInStatement()
394 ReserveFeedbackSlots(node); in VisitForInStatement()
398 void AstNumberingVisitor::VisitForOfStatement(ForOfStatement* node) { in VisitForOfStatement() argument
401 node->set_base_id(ReserveIdRange(ForOfStatement::num_ids())); in VisitForOfStatement()
402 Visit(node->assign_iterator()); in VisitForOfStatement()
403 Visit(node->next_result()); in VisitForOfStatement()
404 Visit(node->result_done()); in VisitForOfStatement()
405 Visit(node->assign_each()); in VisitForOfStatement()
406 Visit(node->body()); in VisitForOfStatement()
407 ReserveFeedbackSlots(node); in VisitForOfStatement()
411 void AstNumberingVisitor::VisitConditional(Conditional* node) { in VisitConditional() argument
413 node->set_base_id(ReserveIdRange(Conditional::num_ids())); in VisitConditional()
414 Visit(node->condition()); in VisitConditional()
415 Visit(node->then_expression()); in VisitConditional()
416 Visit(node->else_expression()); in VisitConditional()
420 void AstNumberingVisitor::VisitIfStatement(IfStatement* node) { in VisitIfStatement() argument
422 node->set_base_id(ReserveIdRange(IfStatement::num_ids())); in VisitIfStatement()
423 Visit(node->condition()); in VisitIfStatement()
424 Visit(node->then_statement()); in VisitIfStatement()
425 if (node->HasElseStatement()) { in VisitIfStatement()
426 Visit(node->else_statement()); in VisitIfStatement()
431 void AstNumberingVisitor::VisitSwitchStatement(SwitchStatement* node) { in VisitSwitchStatement() argument
433 node->set_base_id(ReserveIdRange(SwitchStatement::num_ids())); in VisitSwitchStatement()
434 Visit(node->tag()); in VisitSwitchStatement()
435 ZoneList<CaseClause*>* cases = node->cases(); in VisitSwitchStatement()
442 void AstNumberingVisitor::VisitCaseClause(CaseClause* node) { in VisitCaseClause() argument
444 node->set_base_id(ReserveIdRange(CaseClause::num_ids())); in VisitCaseClause()
445 if (!node->is_default()) Visit(node->label()); in VisitCaseClause()
446 VisitStatements(node->statements()); in VisitCaseClause()
450 void AstNumberingVisitor::VisitForStatement(ForStatement* node) { in VisitForStatement() argument
453 node->set_base_id(ReserveIdRange(ForStatement::num_ids())); in VisitForStatement()
454 if (node->init() != NULL) Visit(node->init()); in VisitForStatement()
455 if (node->cond() != NULL) Visit(node->cond()); in VisitForStatement()
456 if (node->next() != NULL) Visit(node->next()); in VisitForStatement()
457 Visit(node->body()); in VisitForStatement()
461 void AstNumberingVisitor::VisitClassLiteral(ClassLiteral* node) { in VisitClassLiteral() argument
464 node->set_base_id(ReserveIdRange(node->num_ids())); in VisitClassLiteral()
465 if (node->extends()) Visit(node->extends()); in VisitClassLiteral()
466 if (node->constructor()) Visit(node->constructor()); in VisitClassLiteral()
467 if (node->class_variable_proxy()) { in VisitClassLiteral()
468 VisitVariableProxy(node->class_variable_proxy()); in VisitClassLiteral()
470 for (int i = 0; i < node->properties()->length(); i++) { in VisitClassLiteral()
471 VisitObjectLiteralProperty(node->properties()->at(i)); in VisitClassLiteral()
473 ReserveFeedbackSlots(node); in VisitClassLiteral()
477 void AstNumberingVisitor::VisitObjectLiteral(ObjectLiteral* node) { in VisitObjectLiteral() argument
479 node->set_base_id(ReserveIdRange(node->num_ids())); in VisitObjectLiteral()
480 for (int i = 0; i < node->properties()->length(); i++) { in VisitObjectLiteral()
481 VisitObjectLiteralProperty(node->properties()->at(i)); in VisitObjectLiteral()
483 node->BuildConstantProperties(isolate_); in VisitObjectLiteral()
487 node->CalculateEmitStore(zone_); in VisitObjectLiteral()
488 ReserveFeedbackSlots(node); in VisitObjectLiteral()
493 ObjectLiteralProperty* node) { in VisitObjectLiteralProperty() argument
494 if (node->is_computed_name()) DisableCrankshaft(kComputedPropertyName); in VisitObjectLiteralProperty()
495 Visit(node->key()); in VisitObjectLiteralProperty()
496 Visit(node->value()); in VisitObjectLiteralProperty()
500 void AstNumberingVisitor::VisitArrayLiteral(ArrayLiteral* node) { in VisitArrayLiteral() argument
502 node->set_base_id(ReserveIdRange(node->num_ids())); in VisitArrayLiteral()
503 for (int i = 0; i < node->values()->length(); i++) { in VisitArrayLiteral()
504 Visit(node->values()->at(i)); in VisitArrayLiteral()
506 node->BuildConstantElements(isolate_); in VisitArrayLiteral()
507 ReserveFeedbackSlots(node); in VisitArrayLiteral()
511 void AstNumberingVisitor::VisitCall(Call* node) { in VisitCall() argument
513 ReserveFeedbackSlots(node); in VisitCall()
514 node->set_base_id(ReserveIdRange(Call::num_ids())); in VisitCall()
515 Visit(node->expression()); in VisitCall()
516 VisitArguments(node->arguments()); in VisitCall()
520 void AstNumberingVisitor::VisitCallNew(CallNew* node) { in VisitCallNew() argument
522 ReserveFeedbackSlots(node); in VisitCallNew()
523 node->set_base_id(ReserveIdRange(CallNew::num_ids())); in VisitCallNew()
524 Visit(node->expression()); in VisitCallNew()
525 VisitArguments(node->arguments()); in VisitCallNew()
552 void AstNumberingVisitor::VisitFunctionLiteral(FunctionLiteral* node) { in VisitFunctionLiteral() argument
554 node->set_base_id(ReserveIdRange(FunctionLiteral::num_ids())); in VisitFunctionLiteral()
561 RewritableAssignmentExpression* node) { in VisitRewritableAssignmentExpression() argument
563 node->set_base_id(ReserveIdRange(RewritableAssignmentExpression::num_ids())); in VisitRewritableAssignmentExpression()
564 Visit(node->expression()); in VisitRewritableAssignmentExpression()
568 bool AstNumberingVisitor::Finish(FunctionLiteral* node) { in Finish() argument
569 node->set_ast_properties(&properties_); in Finish()
570 node->set_dont_optimize_reason(dont_optimize_reason()); in Finish()
575 bool AstNumberingVisitor::Renumber(FunctionLiteral* node) { in Renumber() argument
576 Scope* scope = node->scope(); in Renumber()
581 return Finish(node); in Renumber()
595 VisitStatements(node->body()); in Renumber()
597 return Finish(node); in Renumber()