ReviewOS

zig-utils/zig-js

VM: remove orphaned numeric-leaf cache metadata

#1085
Closed chris opened this 9 days ago ·
9 days ago

Parent: #498; follows #1082.

After retiring the call-loop family, quickLeafPlan and quickImmutableLocalBinding remain definitions with no callers. Chunk.quick_leaf_plan is read/written only by the unused publisher. The published quickening inventory still describes per-callee arena allocation, compare-exchange publication, and cached unsupported leaves that the remaining call path does not perform.

Executed checks at ee6ae904's unchanged production runtime:

  • A 20-iteration ordinary/captured/receiver/arguments-leaf program returns 1200 in Node, forced tree, and required bytecode.
  • The linked focused call-contract binary contains nativeDirectCalleeIsLegacySafe and no symbols for the two unused helpers. Whole-tree references confirm no publication consumer.
  • compileQuickLeafPlan remains live in the native legacy-frame safety proof; it must remain, together with its bounded operation metadata. The AST arguments specialization uses a stack-local plan for one call.

Required change:

  • Remove the unused publisher, immutable-binding walker, and per-chunk pointer field.
  • Keep the live bounded decoder and native safety proof.
  • Correct inventory coverage/lifetime/synchronization descriptions to distinguish stack-local AST evaluation from native safety classification; regenerate the page and rendered manifest.
  • Preserve current result, exact-step, hook, termination, GC, OOM, no-GIL, and native-call behavior. No performance claim or historical benchmark rewrite.

Definition of done:

  • The obsolete helper/field references are removed and the decoder's production native consumer remains.
  • Focused call/arguments and native legacy-frame gates pass Debug, ReleaseSafe, and unsuppressed TSan.
  • Saved-parent/current affected corpus diagnostics and tree/VM outcomes match with a nonzero denominator.
  • Inventory, link, and rendered-doc gates pass; commit and scoped evidence are published.
9 days ago

Fixed in 26df715f. The uncalled publisher, binding walker, and Chunk.quick_leaf_plan are removed. The bounded bytecode decoder and its live nativeDirectCalleeIsLegacySafe consumer remain. The inventory now distinguishes stack-local AST arguments evaluation from native safety classification and lists the two remaining Chunk quickening fields.

Qualification:

  • Ordinary, captured, receiver, and arguments-leaf controls return 1200 in Node and both forced tiers before/after.
  • All 13 selected functional call/arguments/native-frame tests pass Debug, ReleaseSafe, and unsuppressed TSan; coverage includes actual no-GIL workers, moving GC, exact steps, hooks, termination, and active legacy arguments.
  • Five affected upstream subtrees have byte-identical diagnostics and tree/VM outcomes across 1,579 cases. Default-tier failures are zero on both sides; the same three pre-existing proper-tail-call divergences remain.
  • Inventory self-test/validation, GC relocation audit, 378-file link audit, and regenerated/checked 51-page docs manifest pass. No public performance table was changed.

The independent warmed captured-value coercion failure is reproduced on both binaries and tracked in #1086. Full local combined units remain memory-cap blocked by #933; hosted integration is pending.

Sign in to comment on this issue.