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

Normative: remove IsCallable check in GetKeysIterator #101

Merged
merged 3 commits into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
44 changes: 22 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"format": "emu-format --write 'spec/*.html'"
},
"devDependencies": {
"@tc39/ecma262-biblio": "^2.1.2407",
"ecmarkup": "^15.0.0"
"@tc39/ecma262-biblio": "2.1.2599",
"ecmarkup": "^17.0.2"
},
"version": "1.0.0",
"repository": {
Expand Down
29 changes: 6 additions & 23 deletions spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h1>Set.prototype.union ( _other_ )</h1>
1. Let _O_ be the *this* value.
1. Perform ? RequireInternalSlot(_O_, [[SetData]]).
1. Let _otherRec_ be ? GetSetRecord(_other_).
1. Let _keysIter_ be ? GetKeysIterator(_otherRec_).
1. Let _keysIter_ be ? GetIteratorFromMethod(_otherRec_.[[Set]], _otherRec_.[[Keys]]).
1. Let _resultSetData_ be a copy of _O_.[[SetData]].
1. Let _next_ be *true*.
1. Repeat, while _next_ is not *false*,
Expand Down Expand Up @@ -54,7 +54,7 @@ <h1>Set.prototype.intersection ( _other_ )</h1>
1. NOTE: The number of elements in _O_.[[SetData]] may have increased during execution of _otherRec_.[[Has]].
1. Set _thisSize_ to the number of elements of _O_.[[SetData]].
1. Else,
1. Let _keysIter_ be ? GetKeysIterator(_otherRec_).
1. Let _keysIter_ be ? GetIteratorFromMethod(_otherRec_.[[Set]], _otherRec_.[[Keys]]).
1. Let _next_ be *true*.
1. Repeat, while _next_ is not *false*,
1. Set _next_ to ? IteratorStep(_keysIter_).
Expand Down Expand Up @@ -91,7 +91,7 @@ <h1>Set.prototype.difference ( _other_ )</h1>
1. If _inOther_ is *true*, then
1. Set _resultSetData_[_index_] to ~empty~.
1. Else,
1. Let _keysIter_ be ? GetKeysIterator(_otherRec_).
1. Let _keysIter_ be ? GetIteratorFromMethod(_otherRec_.[[Set]], _otherRec_.[[Keys]]).
1. Let _next_ be *true*.
1. Repeat, while _next_ is not *false*,
1. Set _next_ to ? IteratorStep(_keysIter_).
Expand All @@ -113,7 +113,7 @@ <h1>Set.prototype.symmetricDifference ( _other_ )</h1>
1. Let _O_ be the *this* value.
1. Perform ? RequireInternalSlot(_O_, [[SetData]]).
1. Let _otherRec_ be ? GetSetRecord(_other_).
1. Let _keysIter_ be ? GetKeysIterator(_otherRec_).
1. Let _keysIter_ be ? GetIteratorFromMethod(_otherRec_.[[Set]], _otherRec_.[[Keys]]).
1. Let _resultSetData_ be a copy of _O_.[[SetData]].
1. Let _next_ be *true*.
1. Repeat, while _next_ is not *false*,
Expand Down Expand Up @@ -162,7 +162,7 @@ <h1>Set.prototype.isSupersetOf ( _other_ )</h1>
1. Let _otherRec_ be ? GetSetRecord(_other_).
1. Let _thisSize_ be the number of elements in _O_.[[SetData]].
1. If _thisSize_ &lt; _otherRec_.[[Size]], return *false*.
1. Let _keysIter_ be ? GetKeysIterator(_otherRec_).
1. Let _keysIter_ be ? GetIteratorFromMethod(_otherRec_.[[Set]], _otherRec_.[[Keys]]).
1. Let _next_ be *true*.
1. Repeat, while _next_ is not *false*,
1. Set _next_ to ? IteratorStep(_keysIter_).
Expand Down Expand Up @@ -194,7 +194,7 @@ <h1>Set.prototype.isDisjointFrom ( _other_ )</h1>
1. NOTE: The number of elements in _O_.[[SetData]] may have increased during execution of _otherRec_.[[Has]].
1. Set _thisSize_ to the number of elements of _O_.[[SetData]].
1. Else,
1. Let _keysIter_ be ? GetKeysIterator(_otherRec_).
1. Let _keysIter_ be ? GetIteratorFromMethod(_otherRec_.[[Set]], _otherRec_.[[Keys]]).
1. Let _next_ be *true*.
1. Repeat, while _next_ is not *false*,
1. Set _next_ to ? IteratorStep(_keysIter_).
Expand Down Expand Up @@ -296,23 +296,6 @@ <h1>
</emu-alg>
</emu-clause>

<emu-clause id="sec-getkeysiterator" type="abstract operation">
<h1>
GetKeysIterator (
_setRec_: a Set Record,
): either a normal completion containing an Iterator Record or a throw completion
</h1>
<dl class="header">
</dl>
<emu-alg>
1. Let _keysIter_ be ? Call(_setRec_.[[Keys]], _setRec_.[[Set]]).
1. If _keysIter_ is not an Object, throw a *TypeError* exception.
1. Let _nextMethod_ be ? Get(_keysIter_, *"next"*).
1. If IsCallable(_nextMethod_) is *false*, throw a *TypeError* exception.
1. Return a new Iterator Record { [[Iterator]]: _keysIter_, [[NextMethod]]: _nextMethod_, [[Done]]: *false* }.
</emu-alg>
</emu-clause>

<emu-clause id="sec-setdatahas" type="abstract operation">
<h1>
SetDataHas (
Expand Down