Files
vectorcraft/docs
dotCooCoo b19d017c31 JavaScript: Map, Set, WeakMap, WeakSet and typed arrays in ES2015 realms
A realm with Options::es2015 now has Map, Set, WeakMap and WeakSet, and
ArrayBuffer, DataView and the nine typed arrays from Int8Array to
Float64Array with %TypedArray%.from, of and the prototype methods
(ECMA-262 6th edition, sections 22.2 to 24.2). A realm without the
option, the ExtendScript realm included, has none of these names.

- Map and Set compare keys with SameValueZero and keep insertion order.
  forEach and iterators skip entries deleted before they reach them and
  visit entries added during the walk; the collector removes holes and
  moves live iterators.
- WeakMap and WeakSet hold their keys weakly. The collector marks a
  WeakMap value only once its key is reachable another way and drops the
  entries of unreachable keys, also when a value refers to its key.
- Typed arrays store elements little-endian; DataView is big-endian
  unless littleEndian is true. Numeric property names are elements or
  nothing, with the element descriptors of later editions. Copies to the
  same element type keep every bit.
- An ArrayBuffer longer than 2^32 - 1 bytes or than the heap limit is a
  RangeError before anything is allocated, and every element a method
  visits takes fuel.
- Until the language has iterators, the collection constructors and
  %TypedArray%.from read an array, a string by code point or an object
  with a length, by index. A typed array constructor reads an array or
  an object with a length the same way, and converts a first argument
  that is not an object to a length.
- The %TypedArray%.prototype methods that share an Array method use the
  element count, and an Array method called on a typed array reads its
  length property. Array methods visit every element of a typed array
  longer than 4,096.
- Check Script counts new of these constructors as the language's.

test262 runs the Map, Set, WeakMap, WeakSet, ArrayBuffer, DataView,
TypedArray and TypedArrayConstructors folders in ES2015 realms.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-21 22:56:22 -08:00
..
2026-11-20 05:45:14 +07:00
2026-11-19 15:12:20 +07:00