Skip to content

Commit

Permalink
also use when new AO for lookups
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkot committed May 30, 2024
1 parent f3c9505 commit 7fee271
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -41797,8 +41797,9 @@ <h1>Map.prototype.delete ( _key_ )</h1>
<emu-alg>
1. Let _M_ be the *this* value.
1. Perform ? RequireInternalSlot(_M_, [[MapData]]).
1. Set _key_ to CanonicalizeKeyedCollectionKey(_key_).
1. For each Record { [[Key]], [[Value]] } _p_ of _M_.[[MapData]], do
1. If _p_.[[Key]] is not ~empty~ and SameValueZero(_p_.[[Key]], _key_) is *true*, then
1. If _p_.[[Key]] is not ~empty~ and _p_.[[Key]] is _key_, then
1. Set _p_.[[Key]] to ~empty~.
1. Set _p_.[[Value]] to ~empty~.
1. Return *true*.
Expand Down Expand Up @@ -41851,8 +41852,9 @@ <h1>Map.prototype.get ( _key_ )</h1>
<emu-alg>
1. Let _M_ be the *this* value.
1. Perform ? RequireInternalSlot(_M_, [[MapData]]).
1. Set _key_ to CanonicalizeKeyedCollectionKey(_key_).
1. For each Record { [[Key]], [[Value]] } _p_ of _M_.[[MapData]], do
1. If _p_.[[Key]] is not ~empty~ and SameValueZero(_p_.[[Key]], _key_) is *true*, return _p_.[[Value]].
1. If _p_.[[Key]] is not ~empty~ and _p_.[[Key]] is _key_, return _p_.[[Value]].
1. Return *undefined*.
</emu-alg>
</emu-clause>
Expand All @@ -41863,8 +41865,9 @@ <h1>Map.prototype.has ( _key_ )</h1>
<emu-alg>
1. Let _M_ be the *this* value.
1. Perform ? RequireInternalSlot(_M_, [[MapData]]).
1. Set _key_ to CanonicalizeKeyedCollectionKey(_key_).
1. For each Record { [[Key]], [[Value]] } _p_ of _M_.[[MapData]], do
1. If _p_.[[Key]] is not ~empty~ and SameValueZero(_p_.[[Key]], _key_) is *true*, return *true*.
1. If _p_.[[Key]] is not ~empty~ and _p_.[[Key]] is _key_, return *true*.
1. Return *false*.
</emu-alg>
</emu-clause>
Expand All @@ -41884,11 +41887,11 @@ <h1>Map.prototype.set ( _key_, _value_ )</h1>
<emu-alg>
1. Let _M_ be the *this* value.
1. Perform ? RequireInternalSlot(_M_, [[MapData]]).
1. Set _key_ to CanonicalizeKeyedCollectionKey(_key_).
1. For each Record { [[Key]], [[Value]] } _p_ of _M_.[[MapData]], do
1. If _p_.[[Key]] is not ~empty~ and SameValueZero(_p_.[[Key]], _key_) is *true*, then
1. If _p_.[[Key]] is not ~empty~ and _p_.[[Key]] is _key_, then
1. Set _p_.[[Value]] to _value_.
1. Return _M_.
1. Set _key_ to CanonicalizeKeyedCollectionKey(_key_).
1. Let _p_ be the Record { [[Key]]: _key_, [[Value]]: _value_ }.
1. Append _p_ to _M_.[[MapData]].
1. Return _M_.
Expand Down Expand Up @@ -42079,10 +42082,10 @@ <h1>Set.prototype.add ( _value_ )</h1>
<emu-alg>
1. Let _S_ be the *this* value.
1. Perform ? RequireInternalSlot(_S_, [[SetData]]).
1. Set _value_ to CanonicalizeKeyedCollectionKey(_value_).
1. For each element _e_ of _S_.[[SetData]], do
1. If _e_ is not ~empty~ and SameValueZero(_e_, _value_) is *true*, then
1. If _e_ is not ~empty~ and _e_ is _value_, then
1. Return _S_.
1. Set _value_ to CanonicalizeKeyedCollectionKey(_value_).
1. Append _value_ to _S_.[[SetData]].
1. Return _S_.
</emu-alg>
Expand Down Expand Up @@ -42114,8 +42117,9 @@ <h1>Set.prototype.delete ( _value_ )</h1>
<emu-alg>
1. Let _S_ be the *this* value.
1. Perform ? RequireInternalSlot(_S_, [[SetData]]).
1. Set _value_ to CanonicalizeKeyedCollectionKey(_value_).
1. For each element _e_ of _S_.[[SetData]], do
1. If _e_ is not ~empty~ and SameValueZero(_e_, _value_) is *true*, then
1. If _e_ is not ~empty~ and _e_ is _value_, then
1. Replace the element of _S_.[[SetData]] whose value is _e_ with an element whose value is ~empty~.
1. Return *true*.
1. Return *false*.
Expand Down Expand Up @@ -42172,8 +42176,9 @@ <h1>Set.prototype.has ( _value_ )</h1>
<emu-alg>
1. Let _S_ be the *this* value.
1. Perform ? RequireInternalSlot(_S_, [[SetData]]).
1. Set _value_ to CanonicalizeKeyedCollectionKey(_value_).
1. For each element _e_ of _S_.[[SetData]], do
1. If _e_ is not ~empty~ and SameValueZero(_e_, _value_) is *true*, return *true*.
1. If _e_ is not ~empty~ and _e_ is _value_, return *true*.
1. Return *false*.
</emu-alg>
</emu-clause>
Expand Down

0 comments on commit 7fee271

Please sign in to comment.