Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

fixes #188: drop changes to %AsyncFromSyncIteratorPrototype% #193

Merged
merged 2 commits into from
Jul 7, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 0 additions & 67 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -1023,72 +1023,5 @@ <h1>AsyncIterator.prototype [ @@toStringTag ]</h1>
<p>This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.</p>
</emu-clause>
</emu-clause>

<emu-clause id="sec-%asyncfromsynciteratorprototype%-object">
<h1>The %AsyncFromSyncIteratorPrototype% Object</h1>

<emu-clause id="sec-%asyncfromsynciteratorprototype%.next">
<h1>%AsyncFromSyncIteratorPrototype%.next ( _value_ )</h1>
<emu-alg>
1. Let _O_ be the *this* value.
1. <del>Assert: Type(_O_) is Object and _O_ has a [[SyncIteratorRecord]] internal slot.</del>
1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%).
1. <ins>Let _check_ be Completion(RequireInternalSlot(_O_, [[SyncIteratorRecord]])).</ins>
1. <ins>IfAbruptRejectPromise(_check_, _promiseCapability_).</ins>
1. Let _syncIteratorRecord_ be _O_.[[SyncIteratorRecord]].
1. Let _result_ be Completion(IteratorNext(_syncIteratorRecord_, _value_)).
1. IfAbruptRejectPromise(_result_, _promiseCapability_).
1. Return AsyncFromSyncIteratorContinuation(_result_, _promiseCapability_).
</emu-alg>
</emu-clause>

<emu-clause id="sec-%asyncfromsynciteratorprototype%.return">
<h1>%AsyncFromSyncIteratorPrototype%.return ( _value_ )</h1>

<emu-alg>
1. Let _O_ be the *this* value.
1. <del>Assert: Type(_O_) is Object and _O_ has a [[SyncIteratorRecord]] internal slot.</del>
1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%).
1. <ins>Let _check_ be Completion(RequireInternalSlot(_O_, [[SyncIteratorRecord]])).</ins>
1. <ins>IfAbruptRejectPromise(_check_, _promiseCapability_).</ins>
1. Let _return_ be Completion(GetMethod(_syncIterator_, *"return"*)).
1. IfAbruptRejectPromise(_return_, _promiseCapability_).
1. If _return_ is *undefined*, then
1. Let _iterResult_ be CreateIterResultObject(_value_, *true*).
1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, &laquo; _iterResult_ &raquo;).
1. Return _promiseCapability_.[[Promise]].
1. Let _result_ be Completion(Call(_return_, _syncIterator_, &laquo; _value_ &raquo;)).
1. IfAbruptRejectPromise(_result_, _promiseCapability_).
1. If Type(_result_) is not Object, then
1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, &laquo; a newly created *TypeError* object &raquo;).
1. Return _promiseCapability_.[[Promise]].
1. Return AsyncFromSyncIteratorContinuation(_result_, _promiseCapability_).
</emu-alg>
</emu-clause>

<emu-clause id="sec-%asyncfromsynciteratorprototype%.throw">
<h1>%AsyncFromSyncIteratorPrototype%.throw ( _value_ )</h1>

<emu-alg>
1. Let _O_ be the *this* value.
1. <del>Assert: Type(_O_) is Object and _O_ has a [[SyncIteratorRecord]] internal slot.</del>
1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%).
1. <ins>Let _check_ be Completion(RequireInternalSlot(_O_, [[SyncIteratorRecord]])).</ins>
1. <ins>IfAbruptRejectPromise(_check_, _promiseCapability_).</ins>
1. Let _syncIterator_ be _O_.[[SyncIteratorRecord]].[[Iterator]].
1. Let _throw_ be Completion(GetMethod(_syncIterator_, *"throw"*)).
1. IfAbruptRejectPromise(_throw_, _promiseCapability_).
1. If _throw_ is *undefined*, then
1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, &laquo; _value_ &raquo;).
1. Return _promiseCapability_.[[Promise]].
1. Let _result_ be Completion(Call(_throw_, _syncIterator_, &laquo; _value_ &raquo;)).
1. IfAbruptRejectPromise(_result_, _promiseCapability_).
1. If Type(_result_) is not Object, then
1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, &laquo; a newly created *TypeError* object &raquo;).
1. Return _promiseCapability_.[[Promise]].
1. Return AsyncFromSyncIteratorContinuation(_result_, _promiseCapability_).
</emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
</emu-clause>