Skip to content

Move ALP kernel logic out of dispatch macros - #11529

Merged
joseph-isaacs merged 2 commits into
developfrom
ji/mutants-macros-alp
Nov 17, 2026
Merged

joseph-isaacs merged 2 commits into
developfrom
ji/mutants-macros-alp

Conversation

@joseph-isaacs

@joseph-isaacs joseph-isaacs commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

cargo-mutants can't mutate code inside macros, so logic in ALP's match_each_*! bodies was never mutation tested. This moves the chunked decode-and-patch loop, the patched between and the patch-bit loop into generic helpers.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UeniBAvrcuvbZMgsM2XrTM

cargo-mutants does not mutate code inside macro invocations, so logic
written inside `match_each_*!` bodies is never mutation tested. Keep the
macro calls as thin type dispatch and move the logic into private
generic functions that cargo-mutants can mutate:

- `decode_and_patch_chunks` holds the chunked decode-and-patch loop that
  `decompress_chunked_core` ran inside three nested dispatch macros. The
  now-unfulfilled `clippy::cognitive_complexity` expectation is removed.
- `between_patched_impl` holds the patched between kernel body,
  including the combined lower/upper bound predicate.
- `set_patched_bits` holds the loop in `apply_patch_predicate` that
  re-evaluates patched rows within the slice range.

Behavior and operation order are unchanged; the helpers use static
dispatch and are monomorphized exactly as the inline bodies were.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UeniBAvrcuvbZMgsM2XrTM
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
@codspeed

codspeed Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

✅ 1962 untouched benchmarks
⏩ 53 skipped benchmarks1


Comparing ji/mutants-macros-alp (316d1bf) with develop (7737dbb)

Open in CodSpeed

Footnotes

  1. 53 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@joseph-isaacs
joseph-isaacs enabled auto-merge (squash) November 17, 2026 13:27
@joseph-isaacs joseph-isaacs added the changelog/chore A trivial change label Nov 17, 2026 — with Claude

Copy link
Copy Markdown
Contributor Author

CI status: the failing "Integration smoke tests" job fails on develop too, so it doesn't come from this PR. wasm-test/ has no lockfile and picked up fastlanes 0.8.1, which now requires a 'static bound in rle_decompress.rs (E0310). Fixed in #11543. I'll merge develop into this branch once that lands.


Generated by Claude Code

Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
@joseph-isaacs
joseph-isaacs merged commit c2b90fb into develop Nov 17, 2026
77 checks passed
@joseph-isaacs
joseph-isaacs deleted the ji/mutants-macros-alp branch November 17, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/chore A trivial change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants