opencode/packages/codemode-rust/conformance/frames
Sebastian Herrlinger 90a252f339 feat(codemode): iterate the program's iterators in native frames
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.
2026-11-18 18:56:12 +01:00
..
arrays.ts refactor(codemode): give built-in families their own native frame ops 2026-11-18 18:56:12 +01:00
callbacks.ts refactor(codemode): give built-in families their own native frame ops 2026-11-18 18:56:12 +01:00
collections.ts refactor(codemode): give built-in families their own native frame ops 2026-11-18 18:56:12 +01:00
core.ts feat(codemode): iterate the program's iterators in native frames 2026-11-18 18:56:12 +01:00
iterators.ts refactor(codemode): give built-in families their own native frame ops 2026-11-18 18:56:12 +01:00