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