Lines Matching refs:node
23 void GeneratorFunctionBuilder::Prepare(const ir::ScriptFunction *node) const
25 VReg callee = FunctionReg(node);
27 pg_->CreateGeneratorObj(node, callee);
28 pg_->StoreAccumulator(node, funcObj_);
29 pg_->SuspendGenerator(node, funcObj_);
30 pg_->SetLabel(node, catchTable_->LabelSet().TryBegin());
33 void GeneratorFunctionBuilder::CleanUp(const ir::ScriptFunction *node) const
37 pg_->SetLabel(node, labelSet.TryEnd());
38 pg_->SetLabel(node, labelSet.CatchBegin());
39 pg_->GeneratorComplete(node, funcObj_);
40 pg_->EmitThrow(node);
41 pg_->SetLabel(node, labelSet.CatchEnd());
44 void GeneratorFunctionBuilder::DirectReturn(const ir::AstNode *node) const
46 pg_->GeneratorComplete(node, funcObj_);
47 pg_->CreateIterResultObject(node, true);
48 pg_->EmitReturn(node);
51 void GeneratorFunctionBuilder::ImplicitReturn(const ir::AstNode *node) const
53 pg_->LoadConst(node, Constant::JS_UNDEFINED);
54 DirectReturn(node);
57 void GeneratorFunctionBuilder::Yield(const ir::AstNode *node)
63 pg_->CreateIterResultObject(node, false);
64 pg_->GeneratorYield(node, funcObj_);
65 SuspendResumeExecution(node, completionType, completionValue);
67 HandleCompletion(node, completionType, completionValue);