ReviewOS

zig-utils/zig-js

ABI: implement exact JSX element predicate

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

Goal

Implement the exact pinned Home/Bun private-JSC React JSX element predicate:

  • JSC__JSValue__isJSXElement

This is a child of #134, #140, #163, and #164.

Required semantics

  • Return false for primitives and non-element objects.
  • Perform one ordinary observable $$typeof property read for objects, including inherited properties, accessors, and proxies.
  • Return true only for the VM registry symbols Symbol.for("react.element") and Symbol.for("react.transitional.element").
  • Reject local symbols and same-description impostors.
  • Preserve shared-symbol identity across sibling realms in one VM.
  • Publish getter/proxy abrupt completion while returning false.
  • Reject foreign-VM cells deterministically and preserve an existing first pending exception.

Completion evidence

  • Add focused behavioral coverage for both recognized symbols, false cases, ordinary Get observability, sibling realms, foreign VMs, and first-wins exceptions.
  • Add the symbol to both pinned inventories and the linkable private-value fixture.
  • Keep public/private export classification at zero unclassified symbols.
  • Run the focused test first, then one batched Home/Bun/public ABI audit.
  • Update README and compatibility documentation with exact counts and evidence.
  • Close only after implementation and documentation commits are on origin/main.
9 days ago

Completed on origin/main in implementation commit 1a06888 and documentation commit 9743add. Focused coverage passed 3/3 with zero leaks. The batched gates pass at Home 215/431 (216 pending), Bun 209/421 (212 pending), 214/214 linked runtime symbols, 117/117 public declarations, 19 extensions, and 219 classified private/support exports. Benchmark artifact 36a617b remains current because this ABI-only slice does not alter measured execution paths.

Sign in to comment on this issue.