Skip to content

ABI: implement exact private JSCell and JSString bridge #175

Description

@chrisbbreuer

Parents: #163, #164
Depends on: #166, #172

Implement the shared opaque JSCell/JSString operations on the context-owned JSC64 handle boundary.

Acceptance:

  • Export exact JSC__JSValue__asString, JSC__JSString__eql, JSC__JSString__is8Bit, JSC__JSString__length, JSC__JSString__toObject, JSC__JSCell__getObject, and JSC__JSCell__toObject signatures.
  • Downcast only real context-owned string cells and reject immediates/non-strings safely.
  • Report JavaScript UTF-16 code-unit length exactly for ASCII, Latin-1, BMP, astral, and lone-surrogate/WTF-8 strings.
  • Match JSC 8-bit string eligibility and value equality across distinct string cells.
  • Return objects only for actual object cells from getObject; box String/Symbol/BigInt cells correctly through toObject and preserve object identity.
  • Reject foreign-context coercion safely.
  • Cover all signatures and semantic boundaries in the compile-link-runtime fixture.
  • Update both inventories and README/API documentation without changing public/extension counts.

String iteration and ZigString/Bun.String output layouts remain separate follow-up work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions