Lines Matching refs:node
23 void AsyncGeneratorFunctionBuilder::Prepare(const ir::ScriptFunction *node) const
25 VReg callee = FunctionReg(node);
27 pg_->CreateAsyncGeneratorObj(node, callee);
28 pg_->StoreAccumulator(node, funcObj_);
29 pg_->SuspendGenerator(node, funcObj_);
30 pg_->SetLabel(node, catchTable_->LabelSet().TryBegin());
33 void AsyncGeneratorFunctionBuilder::CleanUp(const ir::ScriptFunction *node) const
37 pg_->SetLabel(node, labelSet.TryEnd());
38 pg_->SetLabel(node, labelSet.CatchBegin());
39 pg_->AsyncGeneratorReject(node, funcObj_);
40 pg_->EmitReturn(node);
41 pg_->SetLabel(node, labelSet.CatchEnd());
44 void AsyncGeneratorFunctionBuilder::DirectReturn(const ir::AstNode *node) const
46 pg_->AsyncGeneratorResolve(node, funcObj_);
47 pg_->EmitReturn(node);
50 void AsyncGeneratorFunctionBuilder::ImplicitReturn(const ir::AstNode *node) const
52 pg_->LoadConst(node, Constant::JS_UNDEFINED);
53 DirectReturn(node);
56 void AsyncGeneratorFunctionBuilder::Yield(const ir::AstNode *node)
58 Await(node);
64 AsyncYield(node, completionType, completionValue);
75 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::RETURN));
76 pg_->Condition(node, lexer::TokenType::PUNCTUATOR_EQUAL, completionType, notReturnCompletion);
78 pg_->LoadAccumulator(node, completionValue);
79 pg_->AsyncFunctionAwait(node, funcObj_);
80 SuspendResumeExecution(node, completionType, completionValue);
83 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::THROW));
85 pg_->Condition(node, lexer::TokenType::PUNCTUATOR_EQUAL, completionType, normalCompletion);
86 pg_->LoadAccumulator(node, completionValue);
87 pg_->EmitThrow(node);
89 pg_->SetLabel(node, normalCompletion);
93 pg_->LoadAccumulator(node, completionValue);
94 pg_->DirectReturn(node);
96 pg_->SetLabel(node, notReturnCompletion);
98 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::THROW));
99 pg_->Condition(node, lexer::TokenType::PUNCTUATOR_EQUAL, completionType, notThrowCompletion);
100 pg_->LoadAccumulator(node, completionValue);
101 pg_->EmitThrow(node);
102 pg_->SetLabel(node, notThrowCompletion);
103 pg_->LoadAccumulator(node, completionValue);