Parent: #134
Related: #140, #163, #164
Implement the pinned JSC__JSValue__forEach private-ABI boundary as a real iterator-protocol traversal with a native callback per yielded value.
Acceptance
- Perform exact
GetMethod(value, @@iterator), iterator creation, cached next lookup, IteratorStep, and IteratorValue ordering for arrays, strings, Map/Set, generators, and custom iterables.
- Invoke the native callback once per yielded value with the selected global, VM identity, opaque callback context, and stable EncodedJSValue identity.
- Preserve getter/proxy/custom-iterator observability and stop on abrupt completion; close an open iterator when the callback publishes an exception, retaining the original first-wins exception if
return() also throws.
- Accept same-VM sibling values, reject foreign-VM handles, and leave an already-pending exception untouched without advancing the iterable.
- Add focused normal/leak coverage and the pinned consumer compile-link-runtime fixture.
- Update generated Home/Bun inventories, README/docs counts, and all parent issue evidence from committed artifacts.
Parent: #134
Related: #140, #163, #164
Implement the pinned
JSC__JSValue__forEachprivate-ABI boundary as a real iterator-protocol traversal with a native callback per yielded value.Acceptance
GetMethod(value, @@iterator), iterator creation, cachednextlookup, IteratorStep, and IteratorValue ordering for arrays, strings, Map/Set, generators, and custom iterables.return()also throws.