Skip to content

ABI: implement exact private class and display names #225

Description

@chrisbbreuer

Goal

Implement the shared pinned Home/Bun private class and display-name projection cluster:

  • JSC__JSValue__getClassInfoName
  • JSC__JSValue__getClassName
  • JSC__JSValue__getNameProperty
  • JSC__JSValue__getName

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

Acceptance criteria

  • getClassInfoName exposes the exact static class-info name and length only for valid owned cells, with a stable borrowed lifetime and untouched outputs on failure.
  • getNameProperty performs one observable @@toStringTag read, accepts only a non-empty string tag, then applies the pinned JavaScript/internal-function name fallbacks.
  • getClassName rejects non-objects, delegates empty/Function raw class names to the name-property path, and otherwise preserves calculated-class-name before raw-class fallback.
  • getName uses calculated display names first, then the pinned @@toStringTag fallback, returning the exact owned BunString representation.
  • Accessors, proxies, Symbols/non-string tags, anonymous/named/native/bound/class functions, built-ins, ordinary objects, and spoofed user properties have focused coverage.
  • Same-VM sibling realms, foreign cells, invalid encodings, abrupt completion, output initialization, ownership, and first-pending-exception behavior are deterministic.
  • The combined private ABI consumer fixture links and exercises all four exports.
  • Home/Bun inventories, ABI documentation, parent trackers, and README counts are updated from committed evidence.
  • Focused tests and the relevant batched ABI audits pass before closure.

Pinned reference

Bun revision 4982b91e, src/jsc/bindings/bindings.cpp, functions JSC__JSValue__getClassInfoName, JSC__JSValue__getClassName, JSC__JSValue__getNameProperty, and JSC__JSValue__getName.

Completion evidence

  • Code: f9c14bc9 — four exact projections, stable class-info metadata, calculated names, observable/VM-inquiry tag paths, borrowed ZigString views, and owned Latin-1/UTF-16 BunString output.
  • Documentation: 5732c29b — README, ABI, API, and Home integration evidence/counts.
  • Focused test: 3/3 passed, 0 skipped, 0 failed, 0 leaked.
  • Batched ABI gate: Home 210/431 implemented (221 pending), Bun 204/421 implemented (217 pending), public C 117/117 plus 214 private/support exports.
  • Consumer fixture: 209/209 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