Parent
Scope
Implement the eight shared pinned reference imports:
Bun__StrongRef__clearBun__StrongRef__deleteBun__StrongRef__newBun__StrongRef__setBun__WeakRef__clearBun__WeakRef__deleteBun__WeakRef__getBun__WeakRef__new
Acceptance criteria
- Strong references retain the exact value across full and nursery collection, and
setatomically replaces the rooted value without leaking the previous root. - Weak references never retain their target, clear after collection when no strong path remains, and return the exact live value beforehand.
- Primitive, object, symbol, empty, and null/invalid inputs follow the pinned consumer boundary without manufacturing foreign-VM values.
- Reference wrappers record and enforce owning VM/global lifetime; cross-VM replacement is rejected deterministically.
clearanddeleteare idempotent where the consumer contract permits it, are safe after target collection, and do not leave collector-visible stale pointers.- The pinned
WeakRefTypeand optional context are preserved for future callback/lifecycle behavior rather than discarded accidentally. - Concurrent root tracing versus set/clear/get/delete is synchronized and covered without collector or wrapper use-after-free.
- Focused precise-GC, lifecycle, invalid-input, and multi-VM tests pass; Home/Bun inventories, combined fixture, API docs, README evidence, and parent trackers are regenerated.