ReviewOS

zig-utils/zig-js

ABI: implement private ToObject and prototype queries

#178
Closed chris opened this 9 days ago ·
9 days ago

Parents: #163, #164 Depends on: #175, #176

Implement the shared private ToObject and prototype-query boundary.

Acceptance:

  • Export exact JSC__JSValue__toObject and JSC__JSValue__getPrototype signatures.
  • Preserve identity for ordinary objects and perform exact realm-aware ToObject boxing for Number, Boolean, String, Symbol, and BigInt primitives.
  • Reject null and undefined through the private null/empty failure boundary.
  • Return exact ordinary, null, function, wrapper, and proxy-observed prototypes.
  • Reject invalid and foreign-context values safely.
  • Cover exact signatures, object identity, all primitive wrapper kinds, null prototypes, and proxy traps in the compile-link-runtime fixture.
  • Update both inventories and README/API documentation without changing public/extension counts.
9 days ago

Implemented and documented on main in dacec16 and a2024aa. Focused evidence: Home 31/432 with 29/29 runtime symbols, Bun core 31/422, and public/extension accounting unchanged at 117/19.

Sign in to comment on this issue.