Skip to content

ABI: implement the Home private JSMap boundary #191

Description

@chrisbbreuer

Parent: #163
Depends on: #175, #176

Implement the complete seven-symbol JSMap.zig private ABI declared by the pinned Home profile. Bun routes these calls through its excluded generated bun.cpp surface, so this child intentionally changes the Home denominator only.

Exact ABI scope

  • JSC__JSMap__create
  • JSC__JSMap__set
  • JSC__JSMap__get
  • JSC__JSMap__has
  • JSC__JSMap__remove
  • JSC__JSMap__clear
  • JSC__JSMap__size

Acceptance

  • Create a fresh native Map with the selected realm Map.prototype and return its exact opaque cell pointer.
  • Operate directly on native Map internal storage without invoking mutable userland Map.prototype methods, accessors, proxies, or subclass hooks.
  • Match SameValueZero key semantics, including NaN equality, +0/-0 canonicalization, primitive value equality, and object identity.
  • Preserve insertion order; replacing an existing value does not move its key; deletion leaves iteration coherent; reinsertion appends; clear removes every live entry.
  • Return exact stored value identity, undefined for a missing key, exact has/remove booleans, and live-entry usize size.
  • Accept sibling-realm keys and values from the same VM, reject foreign-VM values failure-atomically with a VM-shared TypeError, and preserve the first pending exception.
  • Reject non-Map, WeakMap, exception, empty, and mismatched-VM handles safely without mutating state.
  • Extend the combined compile-link-runtime fixture with selected-realm, identity, SameValueZero, ordering, direct-storage, invalid-handle, and exception tests.
  • Regenerate and verify inventories, update README/API/ABI/Home docs and parent issue evidence, and keep Bun/public/extension accounting unchanged.

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