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

Editorial: Add a few well-known intrinsic objects #1105

Closed
wants to merge 1 commit into from
Closed
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
215 changes: 215 additions & 0 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -2337,6 +2337,115 @@ <h1>Well-Known Intrinsic Objects</h1>
The initial value of the `prototype` data property of %Map%
</td>
</tr>
<tr>
<td>
%MapProto_clear%
</td>
<td>
`Map.prototype.clear`
</td>
<td>
The initial value of the `clear` data property of %MapPrototype% (<emu-xref href="#sec-map.prototype.clear"></emu-xref>)
</td>
</tr>
<tr>
<td>
%MapProto_delete%
</td>
<td>
`Map.prototype.delete`
</td>
<td>
The initial value of the `delete` data property of %MapPrototype% (<emu-xref href="#sec-map.prototype.delete"></emu-xref>)
</td>
</tr>
<tr>
<td>
%MapProto_entries%
</td>
<td>
`Map.prototype.entries`
</td>
<td>
The initial value of the `entries` data property of %MapPrototype% (<emu-xref href="#sec-map.prototype.entries"></emu-xref>)
</td>
</tr>
<tr>
<td>
%MapProto_forEach%
</td>
<td>
`Map.prototype.forEach`
</td>
<td>
The initial value of the `forEach` data property of %MapPrototype% (<emu-xref href="#sec-map.prototype.foreach"></emu-xref>)
</td>
</tr>
<tr>
<td>
%MapProto_get%
</td>
<td>
`Map.prototype.get`
</td>
<td>
The initial value of the `get` data property of %MapPrototype% (<emu-xref href="#sec-map.prototype.get"></emu-xref>)
</td>
</tr>
<tr>
<td>
%MapProto_has%
</td>
<td>
`Map.prototype.has`
</td>
<td>
The initial value of the `has` data property of %MapPrototype% (<emu-xref href="#sec-map.prototype.has"></emu-xref>)
</td>
</tr>
<tr>
<td>
%MapProto_keys%
</td>
<td>
`Map.prototype.keys`
</td>
<td>
The initial value of the `keys` data property of %MapPrototype% (<emu-xref href="#sec-map.prototype.keys"></emu-xref>)
</td>
</tr>
<tr>
<td>
%MapProto_set%
</td>
<td>
`Map.prototype.set`
</td>
<td>
The initial value of the `set` data property of %MapPrototype% (<emu-xref href="#sec-map.prototype.set"></emu-xref>)
</td>
</tr>
<tr>
<td>
%MapProto_size_get%
</td>
<td>
</td>
<td>
The initial value of the get accessor function of the `size` accessor property of %MapPrototype% (<emu-xref href="#sec-get-map.prototype.size"></emu-xref>)
</td>
</tr>
<tr>
<td>
%MapProto_values%
</td>
<td>
`Map.prototype.values`
</td>
<td>
The initial value of the `values` data property of %MapPrototype% (<emu-xref href="#sec-map.prototype.values"></emu-xref>)
</td>
</tr>
<tr>
<td>
%Math%
Expand Down Expand Up @@ -2622,6 +2731,93 @@ <h1>Well-Known Intrinsic Objects</h1>
The initial value of the `prototype` data property of %Set%
</td>
</tr>
<tr>
<td>
%SetProto_add%
</td>
<td>
`Set.prototype.add`
</td>
<td>
The initial value of the `add` data property of %SetPrototype% (<emu-xref href="#sec-set.prototype.add"></emu-xref>)
</td>
</tr>
<tr>
<td>
%SetProto_clear%
</td>
<td>
`Set.prototype.clear`
</td>
<td>
The initial value of the `clear` data property of %SetPrototype% (<emu-xref href="#sec-set.prototype.clear"></emu-xref>)
</td>
</tr>
<tr>
<td>
%SetProto_delete%
</td>
<td>
`Set.prototype.delete`
</td>
<td>
The initial value of the `delete` data property of %SetPrototype% (<emu-xref href="#sec-set.prototype.delete"></emu-xref>)
</td>
</tr>
<tr>
<td>
%SetProto_entries%
</td>
<td>
`Set.prototype.entries`
</td>
<td>
The initial value of the `entries` data property of %SetPrototype% (<emu-xref href="#sec-set.prototype.entries"></emu-xref>)
</td>
</tr>
<tr>
<td>
%SetProto_has%
</td>
<td>
`Set.prototype.has`
</td>
<td>
The initial value of the `has` data property of %SetPrototype% (<emu-xref href="#sec-set.prototype.has"></emu-xref>)
</td>
</tr>
<tr>
<td>
%SetProto_keys%
</td>
<td>
`Set.prototype.keys`
</td>
<td>
The initial value of the `keys` data property of %SetPrototype% (<emu-xref href="#sec-set.prototype.keys"></emu-xref>)
</td>
</tr>
<tr>
<td>
%SetProto_size_get%
</td>
<td>
</td>
<td>
The initial value of the get accessor function of the `size` accessor property of %SetPrototype% (<emu-xref href="#sec-get-set.prototype.size"></emu-xref>)
</td>
</tr>
<tr>
<td>
%SetProto_values%
</td>
<td>
`Set.prototype.values`
</td>
<td>
The initial value of the `values` data property of %SetPrototype% (<emu-xref href="#sec-set.prototype.values"></emu-xref>)
</td>
</tr>
<tr>
<td>
%SharedArrayBuffer%
Expand Down Expand Up @@ -34771,6 +34967,7 @@ <h1>Map.prototype.clear ( )</h1>
1. Set _p_.[[Value]] to ~empty~.
1. Return *undefined*.
</emu-alg>
<p>This function is the <dfn>%MapProto_clear%</dfn> intrinsic object.</p>
<emu-note>
<p>The existing [[MapData]] List is preserved because there may be existing Map Iterator objects that are suspended midway through iterating over that List.</p>
</emu-note>
Expand Down Expand Up @@ -34798,6 +34995,7 @@ <h1>Map.prototype.delete ( _key_ )</h1>
1. Return *true*.
1. Return *false*.
</emu-alg>
<p>This function is the <dfn>%MapProto_delete%</dfn> intrinsic object.</p>
<emu-note>
<p>The value ~empty~ is used as a specification device to indicate that an entry has been deleted. Actual implementations may take other actions such as physically removing the entry from internal data structures.</p>
</emu-note>
Expand All @@ -34811,6 +35009,7 @@ <h1>Map.prototype.entries ( )</h1>
1. Let _M_ be the *this* value.
1. Return ? CreateMapIterator(_M_, `"key+value"`).
</emu-alg>
<p>This function is the <dfn>%MapProto_entries%</dfn> intrinsic object.</p>
</emu-clause>

<!-- es6num="23.1.3.5" -->
Expand All @@ -34829,6 +35028,7 @@ <h1>Map.prototype.forEach ( _callbackfn_ [ , _thisArg_ ] )</h1>
1. Perform ? Call(_callbackfn_, _T_, &laquo; _e_.[[Value]], _e_.[[Key]], _M_ &raquo;).
1. Return *undefined*.
</emu-alg>
<p>This function is the <dfn>%MapProto_forEach%</dfn> intrinsic object.</p>
<emu-note>
<p>_callbackfn_ should be a function that accepts three arguments. `forEach` calls _callbackfn_ once for each key/value pair present in the map object, in key insertion order. _callbackfn_ is called only for keys of the map which actually exist; it is not called for keys that have been deleted from the map.</p>
<p>If a _thisArg_ parameter is provided, it will be used as the *this* value for each invocation of _callbackfn_. If it is not provided, *undefined* is used instead.</p>
Expand All @@ -34850,6 +35050,7 @@ <h1>Map.prototype.get ( _key_ )</h1>
1. If _p_.[[Key]] is not ~empty~ and SameValueZero(_p_.[[Key]], _key_) is *true*, return _p_.[[Value]].
1. Return *undefined*.
</emu-alg>
<p>This function is the <dfn>%MapProto_get%</dfn> intrinsic object.</p>
</emu-clause>

<!-- es6num="23.1.3.7" -->
Expand All @@ -34865,6 +35066,7 @@ <h1>Map.prototype.has ( _key_ )</h1>
1. If _p_.[[Key]] is not ~empty~ and SameValueZero(_p_.[[Key]], _key_) is *true*, return *true*.
1. Return *false*.
</emu-alg>
<p>This function is the <dfn>%MapProto_has%</dfn> intrinsic object.</p>
</emu-clause>

<!-- es6num="23.1.3.8" -->
Expand All @@ -34875,6 +35077,7 @@ <h1>Map.prototype.keys ( )</h1>
1. Let _M_ be the *this* value.
1. Return ? CreateMapIterator(_M_, `"key"`).
</emu-alg>
<p>This function is the <dfn>%MapProto_keys%</dfn> intrinsic object.</p>
</emu-clause>

<!-- es6num="23.1.3.9" -->
Expand All @@ -34895,6 +35098,7 @@ <h1>Map.prototype.set ( _key_, _value_ )</h1>
1. Append _p_ as the last element of _entries_.
1. Return _M_.
</emu-alg>
<p>This function is the <dfn>%MapProto_set%</dfn> intrinsic object.</p>
</emu-clause>

<!-- es6num="23.1.3.10" -->
Expand All @@ -34911,6 +35115,7 @@ <h1>get Map.prototype.size</h1>
1. If _p_.[[Key]] is not ~empty~, set _count_ to _count_+1.
1. Return _count_.
</emu-alg>
<p>This function is the <dfn>%MapProto_size_get%</dfn> intrinsic object.</p>
</emu-clause>

<!-- es6num="23.1.3.11" -->
Expand All @@ -34921,6 +35126,7 @@ <h1>Map.prototype.values ( )</h1>
1. Let _M_ be the *this* value.
1. Return ? CreateMapIterator(_M_, `"value"`).
</emu-alg>
<p>This function is the <dfn>%MapProto_values%</dfn> intrinsic object.</p>
</emu-clause>

<!-- es6num="23.1.3.12" -->
Expand Down Expand Up @@ -35136,6 +35342,7 @@ <h1>Set.prototype.add ( _value_ )</h1>
1. Append _value_ as the last element of _entries_.
1. Return _S_.
</emu-alg>
<p>This function is the <dfn>%SetProto_add%</dfn> intrinsic object.</p>
</emu-clause>

<!-- es6num="23.2.3.2" -->
Expand All @@ -35151,6 +35358,7 @@ <h1>Set.prototype.clear ( )</h1>
1. Replace the element of _entries_ whose value is _e_ with an element whose value is ~empty~.
1. Return *undefined*.
</emu-alg>
<p>This function is the <dfn>%SetProto_clear%</dfn> intrinsic object.</p>
<emu-note>
<p>The existing [[SetData]] List is preserved because there may be existing Set Iterator objects that are suspended midway through iterating over that List.</p>
</emu-note>
Expand All @@ -35177,6 +35385,7 @@ <h1>Set.prototype.delete ( _value_ )</h1>
1. Return *true*.
1. Return *false*.
</emu-alg>
<p>This function is the <dfn>%SetProto_delete%</dfn> intrinsic object.</p>
<emu-note>
<p>The value ~empty~ is used as a specification device to indicate that an entry has been deleted. Actual implementations may take other actions such as physically removing the entry from internal data structures.</p>
</emu-note>
Expand All @@ -35190,6 +35399,7 @@ <h1>Set.prototype.entries ( )</h1>
1. Let _S_ be the *this* value.
1. Return ? CreateSetIterator(_S_, `"key+value"`).
</emu-alg>
<p>This function is the <dfn>%SetProto_entries%</dfn> intrinsic object.</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>
Expand All @@ -35211,6 +35421,7 @@ <h1>Set.prototype.forEach ( _callbackfn_ [ , _thisArg_ ] )</h1>
1. Perform ? Call(_callbackfn_, _T_, &laquo; _e_, _e_, _S_ &raquo;).
1. Return *undefined*.
</emu-alg>
<p>This function is the <dfn>%SetProto_forEach%</dfn> intrinsic object.</p>
<emu-note>
<p>_callbackfn_ should be a function that accepts three arguments. `forEach` calls _callbackfn_ once for each value present in the set object, in value insertion order. _callbackfn_ is called only for values of the Set which actually exist; it is not called for keys that have been deleted from the set.</p>
<p>If a _thisArg_ parameter is provided, it will be used as the *this* value for each invocation of _callbackfn_. If it is not provided, *undefined* is used instead.</p>
Expand All @@ -35234,12 +35445,14 @@ <h1>Set.prototype.has ( _value_ )</h1>
1. If _e_ is not ~empty~ and SameValueZero(_e_, _value_) is *true*, return *true*.
1. Return *false*.
</emu-alg>
<p>This function is the <dfn>%SetProto_has%</dfn> intrinsic object.</p>
</emu-clause>

<!-- es6num="23.2.3.8" -->
<emu-clause id="sec-set.prototype.keys">
<h1>Set.prototype.keys ( )</h1>
<p>The initial value of the `keys` property is the same function object as the initial value of the `values` property.</p>
<p>This function is the <dfn>%SetProto_keys%</dfn> intrinsic object.</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>
Expand All @@ -35259,6 +35472,7 @@ <h1>get Set.prototype.size</h1>
1. If _e_ is not ~empty~, set _count_ to _count_+1.
1. Return _count_.
</emu-alg>
<p>This function is the <dfn>%SetProto_size_get%</dfn> intrinsic object.</p>
</emu-clause>

<!-- es6num="23.2.3.10" -->
Expand All @@ -35269,6 +35483,7 @@ <h1>Set.prototype.values ( )</h1>
1. Let _S_ be the *this* value.
1. Return ? CreateSetIterator(_S_, `"value"`).
</emu-alg>
<p>This function is the <dfn>%SetProto_values%</dfn> intrinsic object.</p>
</emu-clause>

<!-- es6num="23.2.3.11" -->
Expand Down