Lines Matching refs:pg_
25 RegScope rs(pg_); in Prepare()
27 VReg completionType = pg_->AllocReg(); in Prepare()
28 VReg completionValue = pg_->AllocReg(); in Prepare()
30 pg_->CreateAsyncGeneratorObj(node, callee); in Prepare()
31 pg_->StoreAccumulator(node, funcObj_); in Prepare()
33 pg_->SetLabel(node, catchTable_->LabelSet().TryBegin()); in Prepare()
35 pg_->LoadConst(node, Constant::JS_UNDEFINED); in Prepare()
43 RegScope rs(pg_); in CleanUp()
44 VReg retVal = pg_->AllocReg(); in CleanUp()
46 pg_->SetLabel(node, labelSet.TryEnd()); in CleanUp()
47 pg_->SetLabel(node, labelSet.CatchBegin()); in CleanUp()
48 pg_->StoreAccumulator(node, retVal); in CleanUp()
49 pg_->GeneratorComplete(node, funcObj_); in CleanUp()
50 pg_->LoadAccumulator(node, retVal); in CleanUp()
51 pg_->AsyncGeneratorReject(node, funcObj_); in CleanUp()
52 pg_->EmitReturn(node); in CleanUp()
53 pg_->SetLabel(node, labelSet.CatchEnd()); in CleanUp()
58 RegScope rs(pg_); in DirectReturn()
59 VReg retVal = pg_->AllocReg(); in DirectReturn()
60 VReg canSuspend = pg_->AllocReg(); in DirectReturn()
62 pg_->StoreAccumulator(node, retVal); in DirectReturn()
63 pg_->StoreConst(node, canSuspend, Constant::JS_TRUE); in DirectReturn()
65 pg_->GeneratorComplete(node, funcObj_); in DirectReturn()
66 pg_->AsyncGeneratorResolve(node, funcObj_, retVal, canSuspend); in DirectReturn()
67 pg_->EmitReturn(node); in DirectReturn()
72 pg_->LoadConst(node, Constant::JS_UNDEFINED); in ImplicitReturn()
78 RegScope rs(pg_); in ExplicitReturn()
79 VReg resumeType = pg_->AllocReg(); in ExplicitReturn()
80 VReg resumeValue = pg_->AllocReg(); in ExplicitReturn()
81 VReg canSuspend = pg_->AllocReg(); in ExplicitReturn()
83 pg_->AsyncFunctionAwait(node, funcObj_); in ExplicitReturn()
85 pg_->GeneratorComplete(node, funcObj_); in ExplicitReturn()
86 pg_->StoreConst(node, canSuspend, Constant::JS_TRUE); in ExplicitReturn()
87 pg_->AsyncGeneratorResolve(node, funcObj_, resumeValue, canSuspend); in ExplicitReturn()
88 pg_->EmitReturn(node); in ExplicitReturn()
93 RegScope rs(pg_); in Yield()
94 VReg value = pg_->AllocReg(); in Yield()
95 VReg resumeType = pg_->AllocReg(); in Yield()
96 VReg resumeValue = pg_->AllocReg(); in Yield()
97 auto *notReturn = pg_->AllocLabel(); in Yield()
98 auto *normalCompletion = pg_->AllocLabel(); in Yield()
99 auto *notThrowCompletion = pg_->AllocLabel(); in Yield()
103 pg_->StoreAccumulator(node, value); in Yield()
108 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::RETURN)); in Yield()
109 pg_->Condition(node, lexer::TokenType::PUNCTUATOR_EQUAL, resumeType, notReturn); in Yield()
112 pg_->LoadAccumulator(node, resumeValue); in Yield()
113 pg_->AsyncFunctionAwait(node, funcObj_); in Yield()
117 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::THROW)); in Yield()
118 pg_->Condition(node, lexer::TokenType::PUNCTUATOR_EQUAL, resumeType, normalCompletion); in Yield()
119 pg_->LoadAccumulator(node, resumeValue); in Yield()
120 pg_->EmitThrow(node); in Yield()
122 pg_->SetLabel(node, normalCompletion); in Yield()
125 pg_->ControlFlowChangeBreak(); in Yield()
126 pg_->LoadAccumulator(node, resumeValue); in Yield()
129 pg_->SetLabel(node, notReturn); in Yield()
131 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::THROW)); in Yield()
132 pg_->Condition(node, lexer::TokenType::PUNCTUATOR_EQUAL, resumeType, notThrowCompletion); in Yield()
133 pg_->LoadAccumulator(node, resumeValue); in Yield()
134 pg_->EmitThrow(node); in Yield()
135 pg_->SetLabel(node, notThrowCompletion); in Yield()
136 pg_->LoadAccumulator(node, resumeValue); in Yield()