Skip to content

ABI: implement the private JSString backing iterator #247

Description

@chrisbbreuer

Parent: #140
Related: #134, #163, #164

Implement the shared private JSString backing-iterator boundary using zig-js owned string cells and the pinned caller-owned callback layout.

Scope

  • JSC__JSString__iterator

Acceptance

  • Validate the JSString cell and selected VM/realm without coercion or observable user code.
  • Reproduce the pinned extern iterator layout (data, stop, append8/append16/write8/write16 callbacks).
  • Deliver 8-bit strings as Latin-1 and non-8-bit strings as exact UTF-16 code units, including astral pairs, lone surrogates, embedded NUL, and empty strings.
  • Honor callback nullability and the caller stop flag safely; never retain callback pointers or caller data after return.
  • Reject null, non-string, dead, and foreign-VM cells without pointer access or callback invocation, preserving an existing pending exception.
  • Add focused and compiled-consumer fixtures, update both inventories and README/API/ABI evidence, and publish verification.

Flat zig-js strings may use one append callback; write callbacks remain part of the validated layout for compatibility with consumers that also accept JSC rope traversal.

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