• Home
  • Raw
  • Download

Lines Matching refs:node

38 void FunctionBuilder::DirectReturn(const ir::AstNode *node) const  in DirectReturn()
40 pg_->NotifyConcurrentResult(node); in DirectReturn()
41 pg_->EmitReturn(node); in DirectReturn()
44 void FunctionBuilder::ImplicitReturn(const ir::AstNode *node) const in ImplicitReturn()
50 pg_->NotifyConcurrentResult(node); in ImplicitReturn()
51 pg_->EmitReturn(node); in ImplicitReturn()
54 pg_->LoadConst(node, Constant::JS_UNDEFINED); in ImplicitReturn()
55 pg_->NotifyConcurrentResult(node); in ImplicitReturn()
56 pg_->EmitReturnUndefined(node); in ImplicitReturn()
66 pg_->NotifyConcurrentResult(node); in ImplicitReturn()
67 pg_->EmitReturn(node); in ImplicitReturn()
70 void FunctionBuilder::ExplicitReturn(const ir::AstNode *node) const in ExplicitReturn()
72 DirectReturn(node); in ExplicitReturn()
75 void FunctionBuilder::AsyncYield(const ir::AstNode *node, VReg value, VReg completionType, VReg com… in AsyncYield() argument
81 pg_->GeneratorYield(node, funcObj_); in AsyncYield()
86 pg_->StoreConst(node, done, Constant::JS_FALSE); in AsyncYield()
87 pg_->AsyncGeneratorResolve(node, funcObj_, value, done); in AsyncYield()
89 resumeGenerator(node, completionType, completionValue); in AsyncYield()
92 void FunctionBuilder::SuspendResumeExecution(const ir::AstNode *node, VReg completionType, VReg com… in SuspendResumeExecution() argument
97 pg_->SuspendGenerator(node, funcObj_); // iterResult is in acc in SuspendResumeExecution()
98 resumeGenerator(node, completionType, completionValue); in SuspendResumeExecution()
101 void FunctionBuilder::resumeGenerator(const ir::AstNode *node, VReg completionType, VReg completion… in resumeGenerator() argument
106 pg_->ResumeGenerator(node, funcObj_); in resumeGenerator()
107 pg_->StoreAccumulator(node, completionValue); in resumeGenerator()
108 pg_->GetResumeMode(node, funcObj_); in resumeGenerator()
109 pg_->StoreAccumulator(node, completionType); in resumeGenerator()
112 VReg FunctionBuilder::FunctionReg(const ir::ScriptFunction *node) const in FunctionReg()
114 binder::FunctionScope *scope = node->Scope(); in FunctionReg()
120 void FunctionBuilder::Await(const ir::AstNode *node) in Await() argument
133 pg_->AsyncFunctionAwait(node, funcObj_); in Await()
134 SuspendResumeExecution(node, completionType, completionValue); in Await()
136 HandleCompletion(node, completionType, completionValue); in Await()
139 void FunctionBuilder::HandleCompletion(const ir::AstNode *node, VReg completionType, VReg completio… in HandleCompletion() argument
143 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::RETURN)); in HandleCompletion()
146 pg_->Condition(node, lexer::TokenType::PUNCTUATOR_EQUAL, completionType, notRetLabel); in HandleCompletion()
153 pg_->LoadAccumulator(node, completionValue); in HandleCompletion()
154 pg_->DirectReturn(node); in HandleCompletion()
157 pg_->SetLabel(node, notRetLabel); in HandleCompletion()
160 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::THROW)); in HandleCompletion()
163 pg_->Condition(node, lexer::TokenType::PUNCTUATOR_EQUAL, completionType, not_throw_label); in HandleCompletion()
164 pg_->LoadAccumulator(node, completionValue); in HandleCompletion()
165 pg_->EmitThrow(node); in HandleCompletion()
168 pg_->SetLabel(node, not_throw_label); in HandleCompletion()
169 pg_->LoadAccumulator(node, completionValue); in HandleCompletion()
172 void FunctionBuilder::YieldStar(const ir::AstNode *node) in YieldStar() argument
186 Iterator iterator(pg_, node, GeneratorKind()); in YieldStar()
195 pg_->StoreConst(node, receivedValue, Constant::JS_UNDEFINED); in YieldStar()
196 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::NEXT)); in YieldStar()
197 pg_->StoreAccumulator(node, receivedType); in YieldStar()
198 pg_->MoveVreg(node, nextMethod, iterator.Method()); in YieldStar()
201 pg_->SetLabel(node, loopStart); in YieldStar()
202 pg_->StoreConst(node, exitReturn, Constant::JS_FALSE); in YieldStar()
205 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::NEXT)); in YieldStar()
206 pg_->Condition(node, lexer::TokenType::PUNCTUATOR_STRICT_EQUAL, receivedType, throwCompletion); in YieldStar()
207 pg_->MoveVreg(node, iterator.Method(), nextMethod); in YieldStar()
208 pg_->Branch(node, callMethod); in YieldStar()
211 pg_->SetLabel(node, throwCompletion); in YieldStar()
212 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::THROW)); in YieldStar()
213 pg_->Condition(node, lexer::TokenType::PUNCTUATOR_STRICT_EQUAL, receivedType, returnCompletion); in YieldStar()
219 pg_->BranchIfNotUndefined(node, callMethod); in YieldStar()
231 pg_->ThrowThrowNotExist(node); in YieldStar()
235 pg_->SetLabel(node, returnCompletion); in YieldStar()
236 pg_->StoreConst(node, exitReturn, Constant::JS_TRUE); in YieldStar()
241 pg_->BranchIfNotUndefined(node, callMethod); in YieldStar()
245 pg_->LoadAccumulator(node, receivedValue); in YieldStar()
248 Await(node); in YieldStar()
252 pg_->DirectReturn(node); in YieldStar()
254 pg_->SetLabel(node, callMethod); in YieldStar()
264 Await(node); in YieldStar()
267 pg_->StoreAccumulator(node, receivedValue); in YieldStar()
272 pg_->ThrowIfNotObject(node, receivedValue); in YieldStar()
278 pg_->BranchIfTrue(node, iteratorComplete); in YieldStar()
280 pg_->LoadAccumulator(node, receivedValue); in YieldStar()
288 Await(node); in YieldStar()
290 pg_->StoreAccumulator(node, iterValue); in YieldStar()
291 AsyncYield(node, iterValue, receivedType, receivedValue); in YieldStar()
294 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::RETURN)); in YieldStar()
295 pg_->Condition(node, lexer::TokenType::PUNCTUATOR_EQUAL, receivedType, loopStart); in YieldStar()
298 pg_->LoadAccumulator(node, receivedValue); in YieldStar()
299 pg_->AsyncFunctionAwait(node, funcObj_); in YieldStar()
300 SuspendResumeExecution(node, receivedType, receivedValue); in YieldStar()
303 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::THROW)); in YieldStar()
306 pg_->Condition(node, lexer::TokenType::PUNCTUATOR_EQUAL, receivedType, returnCompletion); in YieldStar()
311 SuspendResumeExecution(node, receivedType, receivedValue); in YieldStar()
314 pg_->Branch(node, loopStart); in YieldStar()
319 pg_->SetLabel(node, iteratorComplete); in YieldStar()
321 pg_->LoadAccumulator(node, exitReturn); in YieldStar()
322 pg_->BranchIfFalse(node, normalOrThrowCompletion); in YieldStar()
328 pg_->StoreAccumulator(node, receivedValue); in YieldStar()
330 pg_->LoadAccumulator(node, receivedValue); in YieldStar()
334 pg_->DirectReturn(node); in YieldStar()
336 pg_->SetLabel(node, normalOrThrowCompletion); in YieldStar()