bigint-number-same-value.js |
---
esid: sec-map.prototype.set
description: >
Observing the expected behavior of keys when a BigInt and Number have
the same value.
info: |
Map.prototype.set ( key , value )
...
Let p be the Record {[[key]]: key, [[value]]: value}.
Append p as the last element of entries.
...
features: [BigInt]
--- |
1075 |
browser.js |
|
0 |
constructor.js |
---
esid: sec-map-constructor
description: >
The Map constructor is the %Map% intrinsic object and the initial value of the
Map property of the global object.
--- |
402 |
does-not-throw-when-set-is-not-callable.js |
---
esid: sec-map-iterable
description: >
Creating a new Map object without arguments doesn't throw if `set` is not
callable
info: |
Map ( [ iterable ] )
When the Set function is called with optional argument iterable the following steps are taken:
...
5. If iterable is not present, let iterable be undefined.
6. If iterable is either undefined or null, let iter be undefined.
7. Else,
a. Let adder be Get(map, "set").
b. ReturnIfAbrupt(adder).
c. If IsCallable(adder) is false, throw a TypeError exception.
...
8. If iter is undefined, return map.
...
--- |
869 |
get-set-method-failure.js |
---
esid: sec-map-iterable
description: >
new Map returns abrupt from getting Map.prototype.set.
info: |
Map ( [ iterable ] )
...
7. Else,
a. Let adder be Get(map, "add").
b. ReturnIfAbrupt(adder).
--- |
561 |
groupBy |
|
|
is-a-constructor.js |
---
esid: sec-ecmascript-standard-built-in-objects
description: >
The Map constructor implements [[Construct]]
info: |
IsConstructor ( argument )
The abstract operation IsConstructor takes argument argument (an ECMAScript language value).
It determines if argument is a function object with a [[Construct]] internal method.
It performs the following steps when called:
If Type(argument) is not Object, return false.
If argument has a [[Construct]] internal method, return true.
Return false.
includes: [isConstructor.js]
features: [Reflect.construct, Map]
--- |
831 |
iterable-calls-set.js |
---
esid: sec-map-iterable
description: >
new Map calls `set` for each item on the iterable argument in order.
info: |
Map ( [ iterable ] )
...
9. Repeat
...
k. Let status be Call(adder, map, «k.[[value]], v.[[value]]»).
...
includes: [compareArray.js]
--- |
956 |
iterator-close-after-set-failure.js |
---
esid: sec-map-iterable
description: >
The iterator is closed when `Map.prototype.set` throws an error.
info: |
Map ( [ iterable ] )
...
9. Repeat
...
k. Let status be Call(adder, map, «k.[[value]], v.[[value]]»).
l. If status is an abrupt completion, return IteratorClose(iter, status).
features: [Symbol.iterator]
--- |
906 |
iterator-close-failure-after-set-failure.js |
---
esid: sec-map-iterable
description: >
The correct error is thrown `Map.prototype.set` throws an error and
the IteratorClose throws an error.
features: [Symbol.iterator]
--- |
709 |
iterator-is-undefined-throws.js |
---
esid: sec-map-objects
description: >
Throws a TypeError if the iterator of the iterable is undefined.
info: |
Map ( [ iterable ] )
...
9. Let iteratorRecord be ? GetIterator(iterable).
features: [Symbol.iterator]
--- |
503 |
iterator-item-first-entry-returns-abrupt.js |
---
esid: sec-map-iterable
description: >
Closes iterator if item first entry completes abruptly.
info: |
Map ( [ iterable ] )
...
9. Repeat
...
d. Let nextItem be IteratorValue(next).
...
g. Let k be Get(nextItem, "0").
h. If k is an abrupt completion, return IteratorClose(iter, k).
...
features: [Symbol.iterator]
--- |
1005 |
iterator-item-second-entry-returns-abrupt.js |
---
esid: sec-map-iterable
description: >
Closes iterator if item second entry completes abruptly.
info: |
Map ( [ iterable ] )
...
9. Repeat
...
d. Let nextItem be IteratorValue(next).
...
i. Let v be Get(nextItem, "1").
j. If v is an abrupt completion, return IteratorClose(iter, v).
...
features: [Symbol.iterator]
--- |
1006 |
iterator-items-are-not-object-close-iterator.js |
---
esid: sec-map-iterable
description: >
Closes the iterator after `not Object` error.
info: |
Map ( [ iterable ] )
...
9. Repeat
...
d. Let nextItem be IteratorValue(next).
e. ReturnIfAbrupt(nextItem).
f. If Type(nextItem) is not Object,
i. Let error be Completion{[[type]]: throw, [[value]]: a newly created
TypeError object, [[target]]:empty}.
ii. Return IteratorClose(iter, error).
features:
- Symbol
- Symbol.iterator
--- |
1557 |
iterator-items-are-not-object.js |
---
esid: sec-map-iterable
description: >
Throws a TypeError if iterable items are not Objects.
info: |
Map ( [ iterable ] )
...
9. Repeat
...
d. Let nextItem be IteratorValue(next).
e. ReturnIfAbrupt(nextItem).
f. If Type(nextItem) is not Object,
i. Let error be Completion{[[type]]: throw, [[value]]: a newly created
TypeError object, [[target]]:empty}.
ii. Return IteratorClose(iter, error).
features: [Symbol]
--- |
1085 |
iterator-next-failure.js |
---
esid: sec-map-iterable
description: >
The iterator is closed when iterable `next` throws an error.
info: |
Map ( [ iterable ] )
...
9. Repeat
a. Let next be IteratorStep(iter).
b. ReturnIfAbrupt(next).
features: [Symbol.iterator]
--- |
627 |
iterator-value-failure.js |
---
esid: sec-map-iterable
description: >
The iterator is closed when iterable `next` value throws an error.
info: |
Map ( [ iterable ] )
...
9. Repeat
...
d. Let nextItem be IteratorValue(next).
e. ReturnIfAbrupt(nextItem).
features: [Symbol.iterator]
--- |
731 |
length.js |
---
es6id: 23.1.2
description: Map.length is 0.
info: |
Properties of the Map Constructor
Besides the length property (whose value is 0)
includes: [propertyHelper.js]
--- |
450 |
map-iterable-empty-does-not-call-set.js |
---
esid: sec-map-iterable
description: >
A Map constructed with an empty iterable argument does not call set.
info: |
Map ( [ iterable ] )
When the Map function is called with optional argument the following steps are
taken:
...
8. If iter is undefined, return map.
9. Repeat
a. Let next be IteratorStep(iter).
b. ReturnIfAbrupt(next).
c. If next is false, return map.
--- |
777 |
map-iterable-throws-when-set-is-not-callable.js |
---
esid: sec-map-iterable
description: >
Throws a TypeError if `set` is not callable on Map constructor with a
iterable argument.
info: |
Map ( [ iterable ] )
When the Map function is called with optional argument the following steps are
taken:
...
5. If iterable is not present, let iterable be undefined.
6. If iterable is either undefined or null, let iter be undefined.
7. Else,
a. Let adder be Get(map, "set").
b. ReturnIfAbrupt(adder).
c. If IsCallable(adder) is false, throw a TypeError exception.
--- |
817 |
map-iterable.js |
---
esid: sec-map-iterable
description: >
Contructor returns a map object set with the elements from the iterable
argument.
info: |
Map ( [ iterable ] )
...
9. Repeat
a. Let next be IteratorStep(iter).
b. ReturnIfAbrupt(next).
c. If next is false, return map.
...
--- |
643 |
map-no-iterable-does-not-call-set.js |
---
esid: sec-map-iterable
description: >
A Map constructed without a iterable argument does not call set.
info: |
Map ( [ iterable ] )
When the Map function is called with optional argument the following steps are
taken:
...
5. If iterable is not present, let iterable be undefined.
6. If iterable is either undefined or null, let iter be undefined.
7. Else,
a. Let adder be Get(map, "set").
b. ReturnIfAbrupt(adder).
c. If IsCallable(adder) is false, throw a TypeError exception.
d. Let iter be GetIterator(iterable).
e. ReturnIfAbrupt(iter).
8. If iter is undefined, return map.
--- |
999 |
map-no-iterable.js |
---
esid: sec-map-iterable
description: >
Returns the new Map object with the new empty list if the iterable argument is
undefined.
info: |
Map ( [ iterable ] )
...
2. Let map be OrdinaryCreateFromConstructor(NewTarget, "%MapPrototype%",
«[[MapData]]» ).
...
4. Map map’s [[MapData]] internal slot to a new empty List.
5. If iterable is not present, let iterable be undefined.
6. If iterable is either undefined or null, let iter be undefined.
...
8. If iter is undefined, return map.
--- |
1065 |
map.js |
---
esid: sec-map-iterable
description: >
Map descriptor as a standard built-in object.
info: |
Map ( [ iterable ] )
17 ECMAScript Standard Built-in Objects
includes: [propertyHelper.js]
--- |
458 |
name.js |
---
esid: sec-map-iterable
description: Map.name value and descriptor.
info: |
Map ( [ iterable ] )
17 ECMAScript Standard Built-in Objects
includes: [propertyHelper.js]
--- |
456 |
newtarget.js |
---
esid: sec-map-iterable
description: >
The new Map object's prototype is Map.prototype
info: |
Map ( [ iterable ] )
When the Map function is called with optional argument the following steps
are taken:
...
2. Let map be OrdinaryCreateFromConstructor(NewTarget, "%MapPrototype%",
«[[MapData]]» ).
...
--- |
807 |
properties-of-map-instances.js |
---
es6id: 23.1.4
description: >
Map instances are ordinary objects that inherit properties from the Map
prototype.
--- |
426 |
properties-of-the-map-prototype-object.js |
---
es6id: 23.1.3
description: >
The prototype of Map.prototype is Object.prototype.
info: |
The Map prototype object is the intrinsic object %MapPrototype%. The value
of the [[Prototype]] internal slot of the Map prototype object is the
intrinsic object %ObjectPrototype% (19.1.3). The Map prototype object is an
ordinary object. It does not have a [[MapData]] internal slot.
--- |
703 |
proto-from-ctor-realm.js |
---
esid: sec-map-iterable
description: Default [[Prototype]] value derived from realm of the newTarget
info: |
[...]
3. Let map be ? OrdinaryCreateFromConstructor(NewTarget, "%MapPrototype%",
« [[MapData]] »).
[...]
9.1.14 GetPrototypeFromConstructor
[...]
3. Let proto be ? Get(constructor, "prototype").
4. If Type(proto) is not Object, then
a. Let realm be ? GetFunctionRealm(constructor).
b. Let proto be realm's intrinsic object named intrinsicDefaultProto.
[...]
features: [cross-realm, Reflect]
--- |
924 |
prototype |
|
|
prototype-of-map.js |
---
es6id: 23.1.2
description: >
The prototype of Map is the intrinsic FunctionPrototype.
info: |
The value of the [[Prototype]] internal slot of the Map constructor is the
intrinsic object %FunctionPrototype% (19.2.3).
--- |
530 |
shell.js |
---
description: |
Test if a given function is a constructor function.
defines: [isConstructor]
features: [Reflect.construct]
--- |
596 |
Symbol.species |
|
|
undefined-newtarget.js |
---
esid: sec-map-iterable
description: >
Throws a TypeError if Map is called without a newTarget.
info: |
Map ( [ iterable ] )
When the Map function is called with optional argument the following steps
are taken:
1. If NewTarget is undefined, throw a TypeError exception.
...
--- |
566 |
valid-keys.js |
---
esid: sec-map.prototype.set
description: Observing the expected behavior of valid keys
info: |
Map.prototype.set ( key , value )
...
Let p be the Record {[[key]]: key, [[value]]: value}.
Append p as the last element of entries.
...
features: [BigInt, Symbol, TypedArray, WeakRef, exponentiation]
--- |
15049 |