Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suggested changes (to the set-methods PR) #3308

Merged
merged 5 commits into from
Mar 29, 2024
Merged
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
40 changes: 20 additions & 20 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -42078,7 +42078,7 @@ <h1>Set Records</h1>
[[Set]]
</td>
<td>
an Object.
an Object
</td>
<td>
the Set or similar object.
Expand Down Expand Up @@ -42136,7 +42136,7 @@ <h1>
1. NOTE: If _rawSize_ is *undefined*, then _numSize_ will be *NaN*.
1. If _numSize_ is *NaN*, throw a *TypeError* exception.
1. Let _intSize_ be ! ToIntegerOrInfinity(_numSize_).
1. If _intSize_ < 0, throw a *RangeError* exception.
1. If _intSize_ &lt; 0, throw a *RangeError* exception.
1. Let _has_ be ? Get(_obj_, *"has"*).
1. If IsCallable(_has_) is *false*, throw a *TypeError* exception.
1. Let _keys_ be ? Get(_obj_, *"keys"*).
Expand All @@ -42148,9 +42148,9 @@ <h1>
<emu-clause id="sec-setdatahas" type="abstract operation">
<h1>
SetDataHas (
_setData_: a List of either ~empty~ or ECMAScript language values,
_setData_: a List of either ECMAScript language values or ~empty~,
_value_: an ECMAScript language value,
): a boolean
): a Boolean
</h1>
<dl class="header">
</dl>
Expand All @@ -42163,16 +42163,16 @@ <h1>
<emu-clause id="sec-setdataindex" type="abstract operation">
<h1>
SetDataIndex (
_setData_: a List of either ~empty~ or ECMAScript language values,
_setData_: a List of either ECMAScript language values or ~empty~,
_value_: an ECMAScript language value,
): either ~missing~ or a non-negative integer
): a non-negative integer or ~missing~
</h1>
<dl class="header">
</dl>
<emu-alg>
1. Let _size be the number of elements in _setData_.
1. Let _size_ be the number of elements in _setData_.
1. Let _index_ be 0.
1. Repeat, while _index_ &lt; _size,
1. Repeat, while _index_ &lt; _size_,
1. Let _e_ be _setData_[_index_].
1. If _e_ is not ~empty~ and SameValueZero(_e_, _value_) is *true*, then
1. Return _index_.
Expand All @@ -42184,7 +42184,7 @@ <h1>
<emu-clause id="sec-setdatasize" type="abstract operation">
<h1>
SetDataSize (
_setData_: a List of either ~empty~ or ECMAScript language values,
_setData_: a List of either ECMAScript language values or ~empty~,
): a non-negative integer
</h1>
<dl class="header">
Expand Down Expand Up @@ -42406,14 +42406,6 @@ <h1>Set.prototype.has ( _value_ )</h1>
</emu-alg>
</emu-clause>

<emu-clause id="sec-set.prototype.keys">
<h1>Set.prototype.keys ( )</h1>
<p>The initial value of the *"keys"* property is %Set.prototype.values%, defined in <emu-xref href="#sec-set.prototype.values"></emu-xref>.</p>
<emu-note>
<p>For iteration purposes, a Set appears similar to a Map where each entry has the same value for its key and value.</p>
</emu-note>
</emu-clause>

<emu-clause id="sec-set.prototype.intersection">
<h1>Set.prototype.intersection ( _other_ )</h1>
<p>This method performs the following steps when called:</p>
Expand All @@ -42436,7 +42428,7 @@ <h1>Set.prototype.intersection ( _other_ )</h1>
1. If _alreadyInResult_ is *false*, then
1. Append _e_ to _resultSetData_.
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. Set _thisSize_ to the number of elements in _O_.[[SetData]].
1. Else,
1. Let _keysIter_ be ? GetIteratorFromMethod(_otherRec_.[[Set]], _otherRec_.[[Keys]]).
1. Let _next_ be *true*.
Expand Down Expand Up @@ -42473,7 +42465,7 @@ <h1>Set.prototype.isDisjointFrom ( _other_ )</h1>
1. Let _inOther_ be ToBoolean(? Call(_otherRec_.[[Has]], _otherRec_.[[Set]], « _e_ »)).
1. If _inOther_ is *true*, return *false*.
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. Set _thisSize_ to the number of elements in _O_.[[SetData]].
1. Else,
1. Let _keysIter_ be ? GetIteratorFromMethod(_otherRec_.[[Set]], _otherRec_.[[Keys]]).
1. Let _next_ be *true*.
Expand Down Expand Up @@ -42505,7 +42497,7 @@ <h1>Set.prototype.isSubsetOf ( _other_ )</h1>
1. Let _inOther_ be ToBoolean(? Call(_otherRec_.[[Has]], _otherRec_.[[Set]], « _e_ »)).
1. If _inOther_ is *false*, return *false*.
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. Set _thisSize_ to the number of elements in _O_.[[SetData]].
1. Return *true*.
</emu-alg>
</emu-clause>
Expand All @@ -42531,6 +42523,14 @@ <h1>Set.prototype.isSupersetOf ( _other_ )</h1>
</emu-alg>
</emu-clause>

<emu-clause id="sec-set.prototype.keys">
<h1>Set.prototype.keys ( )</h1>
<p>The initial value of the *"keys"* property is %Set.prototype.values%, defined in <emu-xref href="#sec-set.prototype.values"></emu-xref>.</p>
<emu-note>
<p>For iteration purposes, a Set appears similar to a Map where each entry has the same value for its key and value.</p>
</emu-note>
</emu-clause>

<emu-clause id="sec-get-set.prototype.size">
<h1>get Set.prototype.size</h1>
<p>`Set.prototype.size` is an accessor property whose set accessor function is *undefined*. Its get accessor function performs the following steps when called:</p>
Expand Down
Loading