Skip to content

ABI: implement exact private property access and mutation #203

Description

@chrisbbreuer

Parent

Scope

Implement the pinned Home/Bun private property-boundary imports with JavaScriptCore-compatible observable behavior:

  • JSC__JSValue__createObject2
  • JSC__JSValue__put
  • JSC__JSValue__putToPropertyKey
  • JSC__JSValue__deleteProperty
  • JSC__JSValue__getIfPropertyExistsImpl
  • JSC__JSValue__getPropertyValue
  • JSC__JSValue__getOwn
  • JSC__JSValue__getOwnByValue

Acceptance criteria

  • createObject2 creates a selected-realm ordinary object and defines key 2 before key 1 with writable/enumerable/configurable data descriptors; duplicate keys retain key 2's insertion position but key 1's value.
  • ZigString put performs a direct named own write, bypassing inherited setters, while property-key putToPropertyKey performs ToPropertyKey once, preserves symbols, handles indexes, and publishes coercion/write exceptions.
  • deleteProperty uses ordinary [[Delete]], including proxy traps and configurability rules, and returns false for non-objects and exceptions.
  • getPropertyValue performs ordinary prototype-aware [[Get]], including indexes, accessors, and proxies; absence returns the deleted sentinel and exceptions return empty.
  • getIfPropertyExistsImpl implements Bun's non-index prototype-pollution-mitigated lookup: walk own properties/proxies but stop before the selected realm's %Object.prototype%; absence returns deleted and exceptions return empty.
  • getOwn and getOwnByValue use GetOwnProperty, invoke own accessors/proxy traps, support BunString/Empty and exact property-key coercion/index paths, and return empty for absence or exception.
  • Focused ABI coverage exercises duplicate-key order, direct-write bypass, numeric and symbol keys, inherited and own accessors, proxy traps, non-configurable delete, prototype cutoff, non-object sentinels, throwing coercion/accessors/traps, cross-realm values, and pending-exception preservation.
  • Home/Bun implementation inventories, ABI documentation, README progress, and parent trackers are updated from checked-in 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