• Home
  • Raw
  • Download

Lines Matching refs:node

23 void AsyncGeneratorFunctionBuilder::Prepare(const ir::ScriptFunction *node)  in Prepare()  argument
26 VReg callee = FunctionReg(node); 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()
36 SuspendResumeExecution(node, completionType, completionValue); in Prepare()
39 void AsyncGeneratorFunctionBuilder::CleanUp(const ir::ScriptFunction *node) const 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()
56 void AsyncGeneratorFunctionBuilder::DirectReturn(const ir::AstNode *node) const 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()
70 pg_->EmitReturn(node); in DirectReturn()
73 void AsyncGeneratorFunctionBuilder::ImplicitReturn(const ir::AstNode *node) const in ImplicitReturn()
76 pg_->LoadConst(node, Constant::JS_UNDEFINED); in ImplicitReturn()
77 DirectReturn(node); in ImplicitReturn()
80 void AsyncGeneratorFunctionBuilder::ExplicitReturn(const ir::AstNode *node) const in ExplicitReturn()
87 pg_->AsyncFunctionAwait(node, funcObj_); in ExplicitReturn()
88 SuspendResumeExecution(node, resumeType, resumeValue); in ExplicitReturn()
89 pg_->GeneratorComplete(node, funcObj_); in ExplicitReturn()
90 pg_->StoreConst(node, canSuspend, Constant::JS_TRUE); in ExplicitReturn()
91 pg_->AsyncGeneratorResolve(node, funcObj_, resumeValue, canSuspend); in ExplicitReturn()
92 pg_->EmitReturn(node); in ExplicitReturn()
95 void AsyncGeneratorFunctionBuilder::Yield(const ir::AstNode *node) in Yield() argument
106 Await(node); in Yield()
107 pg_->StoreAccumulator(node, value); in Yield()
109 AsyncYield(node, value, resumeType, resumeValue); in Yield()
112 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::RETURN)); in Yield()
113 pg_->Condition(node, lexer::TokenType::PUNCTUATOR_EQUAL, resumeType, notReturn); in Yield()
116 pg_->LoadAccumulator(node, resumeValue); in Yield()
117 pg_->AsyncFunctionAwait(node, funcObj_); in Yield()
118 SuspendResumeExecution(node, resumeType, resumeValue); in Yield()
121 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::THROW)); in Yield()
122 pg_->Condition(node, lexer::TokenType::PUNCTUATOR_EQUAL, resumeType, normalCompletion); in Yield()
123 pg_->LoadAccumulator(node, resumeValue); in Yield()
124 pg_->EmitThrow(node); in Yield()
126 pg_->SetLabel(node, normalCompletion); in Yield()
130 pg_->LoadAccumulator(node, resumeValue); in Yield()
131 DirectReturn(node); in Yield()
133 pg_->SetLabel(node, notReturn); in Yield()
135 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::THROW)); in Yield()
136 pg_->Condition(node, lexer::TokenType::PUNCTUATOR_EQUAL, resumeType, notThrowCompletion); in Yield()
137 pg_->LoadAccumulator(node, resumeValue); in Yield()
138 pg_->EmitThrow(node); in Yield()
139 pg_->SetLabel(node, notThrowCompletion); in Yield()
140 pg_->LoadAccumulator(node, resumeValue); in Yield()