Skip to content

ABI: implement exact private property iteration #368

Description

@chrisbbreuer

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

Implement the shared JavaScriptCore-compatible private property-iterator boundary used by the pinned Home and Bun consumers. This is one ownership and observability contract spanning six exports, so it should land atomically rather than as disconnected stubs.

Acceptance:

  • Export Bun__JSPropertyIterator__create, deinit, getLongestPropertyName, getName, getNameAndValue, and getNameAndValueNonObservable with the exact pinned signatures.
  • Snapshot enumerable property names in engine order, including inherited enumerable names when requested, with PropertyNameArray-style duplicate suppression and explicit own-only/non-index behavior.
  • Exclude private names while preserving supported public Symbol-key semantics.
  • Make getNameAndValue perform observable ordinary property access, including prototype lookup, getter execution, Proxy behavior, and pending-exception publication.
  • Make getNameAndValueNonObservable perform a pure VM inquiry: it may walk direct ordinary prototypes, but must return empty at accessors, proxies, custom/opaque slots, or absence without invoking user code.
  • Preserve snapshotted names across later object mutation, expose stable borrowed BunString views for iterator use, and compute longest length in UTF-16 code units.
  • Retain the iterator VM through deinit, enforce VM affinity, and handle invalid indices safely without leaking iterator-owned storage.
  • Add focused engine tests plus compiled Home/Bun consumer coverage in Debug and ReleaseSafe.
  • Refresh both generated private-ABI inventories and update the parent issues with exact evidence.

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