Skip to content

ABI: implement private instanceof and iterator predicates #184

Description

@chrisbbreuer

Parents: #163, #164
Depends on: #180

Implement the shared private user-code-aware instanceof and iterator-method predicates.

Acceptance:

  • Export exact JSC__JSValue__isInstanceOf and JSC__JSValue__isIterable signatures.
  • Match the pinned isInstanceOf precheck: non-object or non-has-instance constructors return false without throwing.
  • Run callable/custom/proxy has-instance behavior, prototype traversal, and Symbol.hasInstance hooks with abrupt completion.
  • Match JavaScriptCore hasIteratorMethod: non-object inputs return false; object Symbol.iterator lookup invokes getters, accepts callable methods, treats null/undefined as absent, and throws for non-callable values.
  • Publish user-code, invalid-prototype, foreign-value, and invalid-handle failures through ABI: implement private VM pending exceptions #180 while returning false.
  • Preserve same-VM sibling values and the first already-pending exception.
  • Cover exact signatures, ordinary/custom/proxy instanceof, primitive prechecks, iterator getters/method validation, thrown hooks, sibling/foreign ownership, and pending-state behavior in the compile-link-runtime fixture.
  • Update both inventories and README/API documentation without changing public/extension counts.

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