A host function used as a callback, through call, apply or bind, or as a
promise handler reads its arguments' program getters first, as when
program code calls it; a getter that throws fails or rejects the call.
Object.getOwnPropertyNames of every built-in constructor and prototype now
lists the reference's names in its order: methods, constants and accessors
move to where the reference defines them, generator prototypes get their
read-only constructor, and Symbol has no prototype. A conformance case
records the names of all of them.
Class declarations and expressions with constructors only new may call,
instance and static methods, accessors and fields, extends of classes and
Error types, super(...) and super.x reads, writes, calls, compound
assignments and deletes (also in object literal methods), home objects,
derived constructors' this before super() and their return rules,
Function.prototype's restricted caller and arguments, class names in
console.log, and the reference's texts for refused class syntax,
decorators and private names. An element read or written with an object
key now calls a program getter or setter, and a function under a computed
key is named by it. Uint8Array, its prototype and Buffer get
BYTES_PER_ELEMENT. #64919 changes only test hooks. Recordings regenerated
from the reference, with class cases from its tests.
New cases for accessor literals and the descriptor built-ins, host runs where
getters cross into host calls, park on a host wait or survive a suspend, and a
collector test for accessor halves replaced while cycles run.
Port d3f6559d93 (#64908) to psychoscript: object-literal get/set, accessor
properties and their descriptors (defineProperty, defineProperties,
getOwnPropertyDescriptor(s), getOwnPropertyNames, Object.create with
descriptors), program getters and setters called from property instructions,
built-ins reading getters ahead and running again (withReads), getters in
iteration, conversions, thenables, JSON, the result crossing and host-call
arguments, display labels, and a streaming response's live state as hidden
accessors. Accessor pairs are heap objects, traced and saved like any other.
Recordings regenerated from the reference; both test262 lists are empty.
OrderedMap never dropped its tombstones, so a Map or Set with constant churn
grew without bound. Each entry now has a logical position, numbered in
insertion order and never reused, and iterators, forEach and the Set methods
hold logical positions instead of slots, through OrderedMap::next_entry.
Once tombstones outnumber live entries (and 32), a delete compacts: tombstones
in front alone move the rest down, as index values count from a wrapping
shift; otherwise every survivor moves, keeping its position in a column used
only when positions have gaps. Snapshots save live entries with their
positions and the next one.
An atom now lives exactly as long as its string. Marking an object marks
its keys' atoms, and names in natives, namespaces, globals and host
namespaces are traced too. Map and Set entries keep a string key as its
atom's string, as JSON.stringify's walk now does for the keys it holds,
so tracing the entry keeps the atom. While a cycle runs the interner
shades every atom it gives out. The sweep frees atoms whose strings were
not reached and the interner reuses their ids.
Atoms of the fresh runtime and of the compiled program stay permanent.
Snapshots save a freed atom as null and restore it as a free id.