append-new-values-normalizes-zero-key.js |
---
esid: proposal-upsert
description: >
Append a new value in the map normalizing +0 and -0.
info: |
Map.prototype.getOrInsert ( key , value )
...
3. Set key to CanonicalizeKeyedCollectionKey(key).
4. For each Record { [[Key]], [[Value]] } p of M.[[MapData]], do
a. If p.[[Key]] is not empty and SameValue(p.[[Key]], key) is true, return p.[[Value]].
5. Let p be the Record { [[Key]]: key, [[Value]]: value }.
6. Append p to M.[[MapData]].
...
features: [Symbol]
--- |
933 |
append-new-values.js |
---
esid: proposal-upsert
description: >
Append a new value as the last element of entries.
info: |
Map.prototype.getOrInsert ( key , value )
...
3. Set key to CanonicalizeKeyedCollectionKey(key).
4. For each Record { [[Key]], [[Value]] } p of M.[[MapData]], do
a. If p.[[Key]] is not empty and SameValue(p.[[Key]], key) is true, return p.[[Value]].
5. Let p be the Record { [[Key]]: key, [[Value]]: value }.
6. Append p to M.[[MapData]].
...
features: [Symbol]
--- |
1329 |
append-value-if-key-is-not-present-different-key-types.js |
---
esid: proposal-upsert
description: >
Inserts the value for the specified key on different types, when key not present.
info: |
Map.prototype.getOrInsert ( key , value )
...
5. Let p be the Record { [[Key]]: key, [[Value]]: value }.
6. Append p to M.[[MapData]].
...
feature: [Symbol]
--- |
1151 |
does-not-have-mapdata-internal-slot-set.js |
---
esid: proposal-upsert
description: >
Throws a TypeError if `this` is a Set Object
info: |
Map.prototype.getOrInsert ( key , value )
...
1. Let M be the this value.
2. Perform ? RequireInternalSlot(M, [[MapData]])
...
features: [Set]
--- |
783 |
does-not-have-mapdata-internal-slot-weakmap.js |
---
esid: proposal-upsert
description: >
Throws a TypeError if `this` is a WeakMap object.
info: |
Map.prototype.getOrInsert ( key , value )
...
1. Let M be the this value.
2. Perform ? RequireInternalSlot(M, [[MapData]]).
...
features: [WeakMap]
--- |
799 |
does-not-have-mapdata-internal-slot.js |
---
esid: proposal-upsert
description: >
Throws a TypeError if `this` object does not have a [[MapData]] internal slot.
info: |
Map.getOrInsert ( key , value )
...
1. Let M be the this value.
2. Perform ? RequireInternalSLot(M, [[MapData]])
...
--- |
980 |
getOrInsert.js |
---
esid: proposal-upsert
description: >
Property type and descriptor.
info: |
Map.prototype.getOrInsert ( key , value )
17 ECMAScript Standard Built-in Objects
includes: [propertyHelper.js]
--- |
805 |
length.js |
---
esid: proposal-upsert
description: >
Map.prototype.getOrInsert.length value and descriptor.
info: |
Map.prototype.getOrInsert ( key , value )
17 ECMAScript Standard Built-in Objects
includes: [propertyHelper.js]
--- |
693 |
name.js |
---
esid: proposal-upsert
description: >
Map.prototype.getOrInsert.name value and descriptor.
info: |
Map.prototype.getOrInsert ( key , value )
17 ECMAScript Standard Built-in Objects
includes: [propertyHelper.js]
--- |
701 |
not-a-constructor.js |
---
esid: proposal-upsert
description: >
Map.prototype.getOrInsert does not implement [[Construct]], is not new-able
info: |
ECMAScript Function Objects
Built-in function objects that are not identified as constructors do not
implement the [[Construct]] internal method unless otherwise specified in
the description of a particular function.
sec-evaluatenew
...
7. If IsConstructor(constructor) is false, throw a TypeError exception.
...
includes: [isConstructor.js]
features: [Reflect.construct, Map, arrow-function]
--- |
1047 |
returns-value-if-key-is-not-present-different-key-types.js |
---
esid: proposal-upsert
description: >
Returns the value from the specified key on different types, when key not present.
info: |
Map.prototype.getOrInsert ( key , value )
...
5. Let p be the Record { [[Key]]: key, [[Value]]: value }.
6. Append p to M.[[MapData]].
7. Return p.[[Value]].
...
feature: [Symbol]
--- |
1054 |
returns-value-if-key-is-present-different-key-types.js |
---
esid: proposal-upsert
description: >
Returns the value set before getOrInsert from the specified key on different types.
info: |
Map.prototype.getOrInsert ( key , value )
...
4. For each Record { [[Key]], [[Value]] } p of M.[[MapData]], do
a. If p.[[Key]] is not empty and SameValue(p.[[Key]], key) is true, return p.[[Value]].
...
features: [Symbol]
--- |
1648 |
returns-value-normalized-zero-key.js |
---
esid: proposal-upsert
description: >
Returns the value from the specified key normalizing +0 and -0.
info: |
Map.prototype.getOrInsert ( key , value )
5. Set key to CanonicalizeKeyedCollectionKey(key).
4. For each Record { [[Key]], [[Value]] } p of M.[[MapData]], do
a. If p.[[Key]] is not empty and SameValue(p.[[Key]], key) is true, return p.[[Value]].
...
--- |
835 |
this-not-object-throw.js |
---
esid: proposal-upsert
description: >
Throws a TypeError if `this` is not an Object.
info: |
Map.prototype.getOrInsert ( key , value )
1. Let M be the this value
2. Perform ? RequireInternalSlot(M, [[MapData]])
...
features: [Symbol]
--- |
1119 |