Skip to content

ABI: implement exact private property-path traversal #224

Description

@chrisbbreuer

Goal

Implement the shared pinned Home/Bun JSC__JSValue__getIfPropertyExistsFromPath export with the exact observable behavior of Bun revision 4982b91e, then promote it from pending to implemented in both checked-in inventories.

Parent: #134
Profile umbrella: #140
Home profile: #163
Bun profile: #164

Acceptance criteria

  • String paths follow the pinned UTF-16 parser exactly: [, ], and . are separators; empty, leading/trailing/consecutive-dot, separator-only, bracket, and Unicode cases preserve Bun/JSC behavior.
  • Array paths accept only string and number elements, obtain length once with ToLength, perform indexed Get in order (including holes/prototypes/proxies), and use exact JavaScript number-to-string property keys.
  • Every traversed value is boxed with ToObject; inherited properties, accessors, proxies, and primitive receivers behave observably like the pinned implementation.
  • Present undefined remains distinct from an absent path; property lookup performs one observable Get per segment and does not introduce a separate has trap.
  • Abrupt completion and pre-existing pending exceptions are first-wins and return the private empty sentinel; invalid or foreign boundary inputs fail deterministically.
  • Focused runtime coverage and the combined private ABI consumer fixture link and execute the export.
  • Home/Bun inventories, ABI documentation, parent trackers, and README counts are updated from the committed evidence.
  • The relevant batched ABI audits and tests pass before closure.

Pinned reference

src/jsc/bindings/bindings.cpp at Bun revision 4982b91e, function JSC__JSValue__getIfPropertyExistsFromPath. Array traversal delegates to JSC forEachInArrayLike, i.e. ToLength followed by indexed Get for each entry.

Completion evidence

  • Code: 2d169b1d — exact UTF-16 string grammar, JSC-style array-like traversal, one-Get segment lookup, VM ownership, and exception handling.
  • Documentation: 860bd259 — README, ABI, API, and Home integration evidence/counts.
  • Focused test: 3/3 passed, 0 skipped, 0 failed, 0 leaked.
  • Batched ABI gate: Home 206/431 implemented (225 pending), Bun 200/421 implemented (221 pending), public C 117/117 plus 210 private/support exports.
  • Consumer fixture: 205/205 symbols linked and the runtime matrix passed.
  • Benchmark report remains the isolated 1,540-sample artifact at 36a617b3; this ABI-only slice did not regenerate performance scores.

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