ReviewOS

zig-utils/zig-js

ABI: implement private Object keys and values

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

Parents: #163, #164 Depends on: #178, #180, #181

Implement the shared private Object.keys/Object.values boundary.

Acceptance:

  • Export exact JSC__JSValue__keys and JSC__JSValue__values signatures.
  • Apply ToObject in the selected realm, including string/number/boolean primitives, and publish nullish or foreign-VM failures through the shared pending-exception slot.
  • Return fresh selected-realm arrays of own enumerable string keys/values in ECMAScript property order; exclude symbols and non-enumerable properties.
  • Preserve UTF-16 string-wrapper index behavior, including astral and lone-surrogate strings.
  • Make keys observe proxy ownKeys/getOwnPropertyDescriptor behavior without reading property values.
  • Make values re-check enumerability and perform Get in order, invoking accessors/proxy traps exactly once and publishing thrown values without replacing an existing exception.
  • Accept same-VM sibling values and reject foreign-VM cells.
  • Refresh Home/Bun inventories and README/API documentation without changing public/extension counts.
9 days ago

Implemented and documented on main in f3c675d and b4dcc91.

Evidence:

  • zig build test-home-private-abi: 59/59 private value symbols linked; runtime matrix passed.
  • Focused Object reflection unit gate: 3/3 passed with zero leaks.
  • Home private inventory: 61/432 implemented, 371 pending.
  • Bun core private inventory: 61/422 implemented, 361 pending.
  • Public/extension accounting remains 117/19.
  • Runtime coverage includes numeric/string property order, non-enumerable and Symbol exclusion, no value reads for keys, ordered getters for values, proxy trap sequences, exact thrown values, same-VM sibling values, foreign-VM rejection, and astral UTF-16 indices.

Sign in to comment on this issue.