Lines Matching refs:completion

141     // 9. Let completion be next.[[Completion]].
143 JSHandle<CompletionRecord> completion(thread, rcd);
144 CompletionRecordType type = completion->GetType();
145 // 10. If completion is an abrupt completion, then
156 // i. If completion.[[Type]] is return, then
157 if (completion->GetType() == CompletionRecordType::RETURN) {
160 // 2. Let promise be ? PromiseResolve(%Promise%, completion.[[Value]]).
162 JSHandle<JSTaggedValue> val(thread, completion->GetValue());
196 // 1. Assert: completion.[[Type]] is throw.
197 ASSERT(completion->GetType() == CompletionRecordType::THROW);
198 // 2. Perform ! AsyncGeneratorReject(generator, completion.[[Value]]).
199 JSHandle<JSTaggedValue> comVal(thread, completion->GetValue());
221 // 18. Resume the suspended evaluation of genContext using completion as the result of the operation that
222 // suspended it. Let result be the completion record returned by the resumed computation.
223 // 19. Assert: result is never an abrupt completion.
229 if (completion->GetType() == CompletionRecordType::NORMAL) {
230 AsyncGeneratorHelper::Next(thread, genContext, completion->GetValue());
232 if (completion->GetType() == CompletionRecordType::RETURN) {
233 AsyncGeneratorHelper::Return(thread, genContext, completion);
235 if (completion->GetType() == CompletionRecordType::THROW) {
236 AsyncGeneratorHelper::Throw(thread, genContext, completion);
252 // 3. If check is an abrupt completion, then
280 // 5. Let request be AsyncGeneratorRequest { [[Completion]]: completion, [[Capability]]: promiseCapability }.