Goal
Implement the three pinned Home/Bun CallFrame introspection exports for Zig host callbacks: Bun__CallFrame__getCallerSrcLoc, Bun__CallFrame__isFromBunMain, and debug Bun__CallFrame__describeFrame.
Parent tracking: #134, #140, #163, #164. Depends on #248 and #250.
Required implementation
- Associate each active pinned JSC64 callback frame with its owning VM and visible JavaScript caller without changing the consumer-visible register layout.
- Return an owned source URL plus exact one-based line/column, skipping the private native frame and preserving same-VM sibling behavior.
- Detect
builtin://bun/mainfrom caller source origin and reject null, stale, mismatched-frame, and foreign-VM inputs. - Provide a stable NUL-terminated debug description for the active frame without heap lifetime ambiguity.
- Preserve nested/reentrant native callbacks and pending exceptions.
- Promote both inventories and update README/API/Home/ABI evidence.
Evidence gate
- Compiled consumer invokes all three exports from ordinary, constructor, nested, named-source, builtin-source, sibling-global, invalid, and foreign-VM cases.
- Home/Bun inventories remain zero-unclassified.
- Targeted host-function/CallFrame runtime matrix passes; broad testing stays batched with adjacent slices.
- Current benchmark remains linked unless measured workload code changes.