ReviewOS

zig-utils/zig-js

ABI: implement private UTF-16 string inclusion

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

Parents: #163, #164 Depends on: #180, #183

Implement the shared private string inclusion boundary.

Acceptance:

  • Export exact JSC__JSValue__stringIncludes signature.
  • Apply full ToString to the receiver first and search value second, preserving observable hook order.
  • Search by UTF-16 code units from position zero, including empty needles, astral characters, and isolated/high/low surrogate substrings.
  • Return false and publish either coercion failure through #180, preserving thrown value identity and the first pending exception.
  • Preserve same-VM sibling values and reject foreign-VM values safely.
  • Cover exact signature, primitive/object coercion, order, UTF-16 edge cases, thrown hooks, sibling/foreign ownership, and pending-state behavior 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.

Evidence:

  • implementation: 0ead0c65
  • published README/API evidence: 18c64cb5
  • focused private runtime fixture: 51/51 symbols linked and passed
  • Home inventory: 53/432 implemented, 379 pending
  • Bun core inventory: 53/422 implemented, 369 pending
  • public/extension accounting remains 117/19; public C and Bun audits pass

The fixture covers receiver-then-search ToString order, primitive/object and same-VM sibling coercion, empty/ordinary substrings, astral values and each surrogate half, thrown-value identity for either coercion, foreign ownership, and pending-state behavior.

Sign in to comment on this issue.