khagankhan opened PR #14435 from khagankhan:cleanup to bytecodealliance:main:
Cleanups for the gc_ops generator, following up on the review of #14276.
No semantic change in emitted modules. I hashed the Wasm binary of the first 400 seeds before and after each step and all 400 stayed identical. Sorry if it looks like too many changes (I can split) but it is just code moves:
- Replace the spelled-out heap types and the repeated table, global and null-guard instruction patterns with constants and small helpers.
- Record every type and import index where it is created, so
encodeno longer restates the import order as literals.- Split
to_wasm_binaryinto one helper per module section, and name the three typed local banks where they are declared.- Split
encodeinto a dispatcher plus one function per op family, with all root reads and writes going through oneencode_rootkeyed by aRefKind.- Split
Types::fixupinto named steps and rename the fixup family by what each one fixes (fixup_limits,fixup_types,fixup_immediates,fixup_operand).- Move
StackTypeto its own file and collapse its operand fixup into one rule plus two lookup tables.- Add one-line docs to every function, field and variant
+cc @fitzgen
khagankhan requested wasmtime-fuzz-reviewers for a review on PR #14435.
khagankhan requested alexcrichton for a review on PR #14435.
github-actions[bot] added the label fuzzing on PR #14435.
github-actions[bot] commented on PR #14435:
Subscribe to Label Action
cc @fitzgen
<details>
This issue or pull request has been labeled: "fuzzing"Thus the following users have been cc'd because of the following labels:
- fitzgen: fuzzing
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
alexcrichton unassigned alexcrichton from PR #14435 [gc_fuzz]: Clean up the source of gc_ops.
alexcrichton requested fitzgen for a review on PR #14435.
:thumbs_up: fitzgen submitted PR review:
Thanks!
:speech_balloon: fitzgen created PR review comment:
Making sure this doesn't get lost, but we should still generalize these into $n$ locals of each type. Doesn't need to be in this PR.
fitzgen added PR #14435 [gc_fuzz]: Clean up the source of gc_ops to the merge queue.
:memo: khagankhan submitted PR review.
:speech_balloon: khagankhan created PR review comment:
I agree. I have done the Places paradigm on local we need n "boxes" for each type anyway
:check: fitzgen merged PR #14435.
fitzgen removed PR #14435 [gc_fuzz]: Clean up the source of gc_ops from the merge queue.
Last updated: Oct 11 2026 at 04:10 UTC