• 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()
52 pg_->EmitReturn(node); in ImplicitReturn()
55 pg_->LoadConst(node, Constant::JS_UNDEFINED); in ImplicitReturn()
56 pg_->NotifyConcurrentResult(node); in ImplicitReturn()
58 pg_->EmitReturnUndefined(node); in ImplicitReturn()
62 pg_->GetThis(node); in ImplicitReturn()
65 pg_->ThrowIfSuperNotCorrectCall(node, 0); in ImplicitReturn()
68 pg_->NotifyConcurrentResult(node); in ImplicitReturn()
70 pg_->EmitReturn(node); in ImplicitReturn()
73 void FunctionBuilder::ExplicitReturn(const ir::AstNode *node) const in ExplicitReturn()
75 DirectReturn(node); in ExplicitReturn()
78 void FunctionBuilder::AsyncYield(const ir::AstNode *node, VReg value, VReg completionType, VReg com… in AsyncYield() argument
84 pg_->GeneratorYield(node, funcObj_); in AsyncYield()
89 pg_->StoreConst(node, done, Constant::JS_FALSE); in AsyncYield()
90 pg_->AsyncGeneratorResolve(node, funcObj_, value, done); in AsyncYield()
92 resumeGenerator(node, completionType, completionValue); in AsyncYield()
95 void FunctionBuilder::SuspendResumeExecution(const ir::AstNode *node, VReg completionType, VReg com… in SuspendResumeExecution() argument
100 pg_->SuspendGenerator(node, funcObj_); // iterResult is in acc in SuspendResumeExecution()
101 resumeGenerator(node, completionType, completionValue); in SuspendResumeExecution()
104 void FunctionBuilder::resumeGenerator(const ir::AstNode *node, VReg completionType, VReg completion… in resumeGenerator() argument
109 pg_->ResumeGenerator(node, funcObj_); in resumeGenerator()
110 pg_->StoreAccumulator(node, completionValue); in resumeGenerator()
111 pg_->GetResumeMode(node, funcObj_); in resumeGenerator()
112 pg_->StoreAccumulator(node, completionType); in resumeGenerator()
115 VReg FunctionBuilder::FunctionReg(const ir::ScriptFunction *node) const in FunctionReg()
117 binder::FunctionScope *scope = node->Scope(); in FunctionReg()
123 void FunctionBuilder::Await(const ir::AstNode *node) in Await() argument
136 pg_->AsyncFunctionAwait(node, funcObj_); in Await()
137 SuspendResumeExecution(node, completionType, completionValue); in Await()
139 HandleCompletion(node, completionType, completionValue); in Await()
142 void FunctionBuilder::HandleCompletion(const ir::AstNode *node, VReg completionType, VReg completio… in HandleCompletion() argument
146 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::RETURN)); in HandleCompletion()
149 pg_->Condition(node, lexer::TokenType::PUNCTUATOR_EQUAL, completionType, notRetLabel); in HandleCompletion()
156 pg_->LoadAccumulator(node, completionValue); in HandleCompletion()
157 pg_->DirectReturn(node); in HandleCompletion()
160 pg_->SetLabel(node, notRetLabel); in HandleCompletion()
163 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::THROW)); in HandleCompletion()
166 pg_->Condition(node, lexer::TokenType::PUNCTUATOR_EQUAL, completionType, not_throw_label); in HandleCompletion()
167 pg_->LoadAccumulator(node, completionValue); in HandleCompletion()
168 pg_->EmitThrow(node); in HandleCompletion()
171 pg_->SetLabel(node, not_throw_label); in HandleCompletion()
172 pg_->LoadAccumulator(node, completionValue); in HandleCompletion()
175 void FunctionBuilder::YieldStar(const ir::AstNode *node) in YieldStar() argument
189 Iterator iterator(pg_, node, GeneratorKind()); in YieldStar()
198 pg_->StoreConst(node, receivedValue, Constant::JS_UNDEFINED); in YieldStar()
199 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::NEXT)); in YieldStar()
200 pg_->StoreAccumulator(node, receivedType); in YieldStar()
201 pg_->MoveVreg(node, nextMethod, iterator.Method()); in YieldStar()
204 pg_->SetLabel(node, loopStart); in YieldStar()
205 pg_->StoreConst(node, exitReturn, Constant::JS_FALSE); in YieldStar()
208 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::NEXT)); in YieldStar()
209 pg_->Condition(node, lexer::TokenType::PUNCTUATOR_STRICT_EQUAL, receivedType, throwCompletion); in YieldStar()
210 pg_->MoveVreg(node, iterator.Method(), nextMethod); in YieldStar()
211 pg_->Branch(node, callMethod); in YieldStar()
214 pg_->SetLabel(node, throwCompletion); in YieldStar()
215 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::THROW)); in YieldStar()
216 pg_->Condition(node, lexer::TokenType::PUNCTUATOR_STRICT_EQUAL, receivedType, returnCompletion); in YieldStar()
222 pg_->BranchIfNotUndefined(node, callMethod); in YieldStar()
234 pg_->ThrowThrowNotExist(node); in YieldStar()
238 pg_->SetLabel(node, returnCompletion); in YieldStar()
239 pg_->StoreConst(node, exitReturn, Constant::JS_TRUE); in YieldStar()
244 pg_->BranchIfNotUndefined(node, callMethod); in YieldStar()
248 pg_->LoadAccumulator(node, receivedValue); in YieldStar()
251 Await(node); in YieldStar()
255 pg_->DirectReturn(node); in YieldStar()
257 pg_->SetLabel(node, callMethod); in YieldStar()
267 Await(node); in YieldStar()
270 pg_->StoreAccumulator(node, receivedValue); in YieldStar()
275 pg_->ThrowIfNotObject(node, receivedValue); in YieldStar()
281 pg_->BranchIfTrue(node, iteratorComplete); in YieldStar()
283 pg_->LoadAccumulator(node, receivedValue); in YieldStar()
291 Await(node); in YieldStar()
293 pg_->StoreAccumulator(node, iterValue); in YieldStar()
294 AsyncYield(node, iterValue, receivedType, receivedValue); in YieldStar()
297 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::RETURN)); in YieldStar()
298 pg_->Condition(node, lexer::TokenType::PUNCTUATOR_EQUAL, receivedType, loopStart); in YieldStar()
301 pg_->LoadAccumulator(node, receivedValue); in YieldStar()
302 pg_->AsyncFunctionAwait(node, funcObj_); in YieldStar()
303 SuspendResumeExecution(node, receivedType, receivedValue); in YieldStar()
306 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::THROW)); in YieldStar()
309 pg_->Condition(node, lexer::TokenType::PUNCTUATOR_NOT_EQUAL, receivedType, loopStart); in YieldStar()
310 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::RETURN)); in YieldStar()
311 pg_->StoreAccumulator(node, receivedType); in YieldStar()
316 SuspendResumeExecution(node, receivedType, receivedValue); in YieldStar()
319 pg_->Branch(node, loopStart); in YieldStar()
324 pg_->SetLabel(node, iteratorComplete); in YieldStar()
326 pg_->LoadAccumulator(node, exitReturn); in YieldStar()
327 pg_->BranchIfFalse(node, normalOrThrowCompletion); in YieldStar()
333 pg_->StoreAccumulator(node, receivedValue); in YieldStar()
335 pg_->LoadAccumulator(node, receivedValue); in YieldStar()
339 pg_->DirectReturn(node); in YieldStar()
341 pg_->SetLabel(node, normalOrThrowCompletion); in YieldStar()