Programs in frames/core.ts record, with message and location, unsupported syntax that
runs or is never reached (classes, with, debugger, new.target, import.meta, super,
nested exports), the bindings it hides, using declarations, nested imports, names
located inside parentheses, and parse errors in acorn's words; a suspension reaches
unsupported syntax after resuming. New cases record values around it, and the api
test checks the suggestion, which the recordings do not capture. streaming.json is
to be regenerated at integration.
Uncaught failures in conformance/frames/core.ts programs record their message with its location, for each site the
Rust compiler now places where the reference does, and the destructuring and member-write behaviour fixed with them.
Left over from the boundary sweep, outside its files: tools() fails with
tools is not a function, delete with a number or symbol key on a
namespace fails as reading one does, and a thrown value that holds a
function, a promise, a namespace or a built-in object, at any depth,
fails as Uncaught: a non-data value, as the reference's
containsRuntimeReference has it.
Recorded: boundary-namespace-calls and six uncaught values.
The deepest level and the error there, with one frame per level (plain,
method, call, apply, generator, async, and built-ins calling the
recursing function back: map, forEach, toString, replace, toJSON,
Array.from, reduce, sort), two frames and three, probed from the
program's top level; exactly the limit succeeding while one more level
fails; and the uncaught RangeError with its location.
for await and an async generator's yield* over a sync generator called
its own throw and return from Rust, through call_counted: the adapter's
frame now calls them, counted as before, and closes a generator without a
throw through its return for nothing, so a search in the generator's
catch or finally parks.
Recorded: search parking in a sync generator's finally and catch under for
await and an async generator's yield*.
An async generator runs from native code, so its frame is a run's base: a
search(...) inside it, or in what its yield* or for await calls, now parks
the generator's frame and those above it with a fresh coroutine, the VM
going back to the resumer's stack as the generator's await does, and the
generator taking the resumer's stack again when they are restored.
Recorded: search parking under yield* over the program's iterator, in a
delegated generator's return() and throw(), in for await over a
generator, and in async generators.
A conversion that would call the program's valueOf or toString no longer
calls it from Rust, as the reference converts in its internal bytecode:
- A built-in called from bytecode converts with conversions restartable: one
that calls the program records its request instead, and a convert frame
runs ToPrimitive as calls, then runs the built-in again with the answers
replayed in order ($vmConvert). A built-in's list of conversions is one
request answered with the whole list, so state it kept in the list (a
Date setter's time) is the one read before the conversions.
- An instruction whose operand converts by calling the program hands the
operation to a convert frame, which runs its slow path the same way and
gives the result back as the instruction would, a jump included.
- A sort comparator's, a replace callback's and toLocaleString's result is
converted from their frames.
A replay rewinds the fuel it spends until it takes its last answer, and
starts no queued host calls meanwhile, so the fuel and its order are those
of the conversions made inline. A message that converts a value and
ignores a failure converts it inline, never leaving a request behind.
Recorded: search parking in each kind of conversion, a Date setter whose
argument changes the date, a suspension inside valueOf, and busy loops
through converting operators and built-ins.
for...of, destructuring, rest elements and spread over an iterator the VM
does not step itself (one whose [Symbol.iterator], next or return is the
program's, a helper's or the host's) now open, step and close it from a
native frame: the instruction pushes the frame, which makes the call and
hands the result back as the instruction would, a finished for...of
jumping to its exit. A step that fails forgets the iterator, as before.
native_resume with return or throw pushes a handler first, so what the
generator throws comes back to the frame instead of unwinding past it
while its step runs, and a for-of frame's close throws what closing threw.
Recorded: search parking in each, a generator whose finally throws while
closed, the iterator errors, and a suspension inside a custom next.
Arrays, iterators, collections and other callbacks each get a native op
whose frames carry a sub-op, dispatched in the family's own file
(family_step), so a family adds steps without touching native.rs; a
snapshot saves the sub-op with the frame. enter_native_sub,
enter_for_of_sub and enter_for_of_record_sub push them.
Each family keeps its streaming cases in conformance/frames/, which
conformance/streaming.ts loads.