Skip to content

ABI: implement VM jobs, module registry, and code invalidation #208

Description

@chrisbbreuer

Parent

Scope

Implement the seven shared pinned job/cache imports:

  • JSC__JSGlobalObject__deleteModuleRegistryEntry
  • JSC__JSGlobalObject__drainMicrotasks
  • JSC__JSGlobalObject__handleRejectedPromises
  • JSC__JSGlobalObject__queueMicrotaskCallback
  • JSC__JSGlobalObject__queueMicrotaskJob
  • JSC__VM__deleteAllCode
  • JSC__VM__drainMicrotasks

Acceptance criteria

  • Job queues remain selected-realm but VM draining observes all required shared work in pinned order, with reentrant jobs drained to quiescence and first exceptions preserved.
  • Native callbacks copy/retain their context safely through execution and run exactly once. Encoded job values enforce same-VM ownership and exact argument identity.
  • Module registry deletion uses exact ZigString decoding, affects only the selected realm entry, and is synchronized with module graph tracing.
  • Rejected-promise handling emits each unhandled event once and respects later handled transitions.
  • deleteAllCode drains jobs, clears module/source caches, safely invalidates every native-tier entry before executable mappings are released, and reports abandoned graphs without leaving stale pointers.
  • Sibling realms, foreign VM/global pairs, null/invalid inputs, callback throws, reentrancy, already-empty queues, module reload, and post-invalidation interpreter fallback are covered.
  • Inventories, README/API evidence, and parent trackers are regenerated from checked-in results.

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