镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

VM: inventory quickening coverage and legacy kernels #659

Closed

Description

@chrisbbreuer

Parent: #498
Related: #465, #481, #493

Problem

The VM already contains polymorphic property inline caches, quick global bindings, numeric leaf/call/recurrence plans, and several structural loop kernels, but there is no machine-readable inventory that distinguishes general adaptive specialization from narrow legacy bytecode-pattern kernels. Remaining dispatch families, guard/miss behavior, metadata lifetime, step/debugger coverage, and parallel synchronization are therefore implicit. That makes it possible to count a benchmark-shaped kernel as broad no-JIT coverage, which #498 explicitly forbids.

Scope

  • Publish a versioned machine-readable inventory of every current inline cache, quick plan, specialization, and structural candidate.
  • Classify each entry as general adaptive specialization, bounded structural kernel, or legacy narrow kernel without promoting a performance claim.
  • Record bytecode/AST surface, production source anchor, guards, miss/dequickening behavior, metadata allocation/lifetime, no-GIL synchronization, observable-step/debugger boundary, tests, and remaining unsupported families.
  • Validate exact entry identity and source anchors so new quickeners or removed guards cannot silently drift outside the inventory.
  • Generate a concise architecture document from the same data and cross-link the VM: build a fast no-JIT execution tier for restricted hosts #498 acceptance boundary.

No-workaround rules

No benchmark/function/source recognizer described as general quickening, no kernel deletion presented as an inventory fix, no unsupported family marked covered through tree-walker fallback, no invented performance number, and no weakening of debugger/step/GC/no-GIL requirements.

Acceptance

  • The inventory names every current quickening family and explicitly identifies narrow legacy kernels.
  • Every entry records guards, miss behavior, lifetime, synchronization, observability, and source/test anchors.
  • Remaining property/index/call/arithmetic/control/allocation dispatch families are explicit and not counted as covered.
  • Validation fails on missing/duplicate identities, missing anchors, unsupported status values, or a legacy kernel labeled general.
  • Generator, release/docs accuracy, and offline links pass; inventory/docs only, 0 Test262 flips.

Activity

  1. added
    enhancementNew feature or request
    performanceMeasured runtime, memory, scaling, or build performance
    runtimeJavaScript runtime and builtin implementation
    on Aug 20, 2026
  2. chrisbbreuer commented on Aug 20, 2026

    @chrisbbreuer
    MemberAuthor

    Audit and local implementation are complete; I am intentionally holding the push until the preceding no-GIL and private-ABI validation jobs finish so this documentation-only commit does not cancel their closure evidence.

    The source-derived contract currently finds:

    • 16 guarded families: 5 general_adaptive, 2 bounded_structural, and 9 exact legacy_narrow kernels;
    • 6 broad families still explicitly unsupported: property, index, call, arithmetic, control, and allocation dispatch;
    • 6 Quick*Plan types, 14 tagged quickening unions, 8 Chunk metadata fields, 2 finalized structural-candidate flags, and 30 test-only observability counters.

    The validator compares those sets directly with src/bytecode.zig and src/vm.zig, validates every production/test anchor and required contract field, and mutation-tests missing/duplicate identities, anchor drift, invalid covered/unsupported status, and legacy-to-general relabeling. The generated page publishes no throughput claim.

    Local gates already green: generator verification/self-test, dedicated Zig build step (3/3), release compatibility (12/12), docs build (50 pages), and offline links (268 files). Runtime/Test262 behavior is untouched (0 flips). Pending only commit/push and fresh CI.

  3. chrisbbreuer commented on Aug 20, 2026

    @chrisbbreuer
    MemberAuthor

    Implemented and pushed in tools(vm): inventory quickening coverage (#659).

    The versioned inventory and generated architecture page classify all 16 guarded families, preserve 9 exact pattern recognizers as legacy_narrow, and leave six broad dispatch families explicitly unsupported. The gate derives the exact plan/tag/Chunk/candidate/counter sets from production sources, validates every lifecycle/synchronization/observability field and source/test anchor, and mutation-tests every acceptance failure mode.

    Local evidence: dedicated gate 3/3, benchmark-comparison gate 31/31, release compatibility 12/12, docs 50 pages, offline links 268 files, 0 Test262 flips. Fresh pushed CI: https://github.com/zig-utils/zig-js/actions/runs/32410670302

  4. chrisbbreuer commented on Aug 20, 2026

    @chrisbbreuer
    MemberAuthor

    Completed in eabd80b2 with the fail-closed dependency classification follow-up faa25a83.

    The versioned inventory now classifies 16 guarded families (5 general adaptive, 2 bounded structural, 9 legacy narrow) and six explicitly unsupported broad property/index/call/arithmetic/control/allocation families. Every entry records surfaces, guards, miss/dequickening, metadata lifetime, no-GIL synchronization, debugger/step behavior, and production/test anchors. Validation derives and checks all 6 Quick plan types, 14 Quick tags, 8 Chunk metadata fields, 2 candidate flags, and 30 counters; it fails on missing/duplicate IDs, source/test drift, invalid states, or a legacy kernel relabeled general.

    Validation:

    • inventory validation/self-test: 3/3 pass
    • release compatibility: 12/12 pass
    • complete local benchmark-comparison-test: 31/31 pass
    • fresh Linux benchmark-comparison harness: pass
    • fresh docs gate: pass
    • dependency audit after classifying both subprocesses and the new tool: 16 edges and 61 tools pass
    • docs build: 50 pages; offline links: 268
    • inventory/docs/tooling only; flips 0 Test262 cases.
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

    enhancementNew feature or requestperformanceMeasured runtime, memory, scaling, or build performanceruntimeJavaScript runtime and builtin implementation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions