Repository navigation
feat(prioritization): expand manifest package hint variants - #7
Merged
Merged
Conversation
caverav
added a commit
that referenced
this pull request
Aug 9, 2026
Two coverage defects in the prologue matcher, both found by measuring the match positions instead of trusting the shape. A thunk that tail-calls a stub reads the same `Thread` slot the stub reads from itself: `ldr x24, [x26, #0x1d8]; ldur x16, [x24, #7]; br x16`. Two per sample matched and were named after the stub they call, and one of them guards its tail call with `cmp w0, w22`, so the name hid a null check. `GenerateSharedStubGeneric` saves the register set before the self-load and the thunks push nothing, so requiring one push onto the Dart stack separates them exactly. The mint allocators save the FPU set as well, which puts their self-load at instruction 37 on 3.5 and 38 on 3.12. The 32-instruction window dropped one stub from every binary and said nothing, because a stub that goes unnamed looks identical to a stub that is not there. Window is 48, which is the deepest measured position plus room. Net on real input: 13 stubs to 12, and 21,889 to 21,369 call sites on LocalSend, 26,649 to 25,967 on Immich. Fewer sites, no false ones -- `slowTypeTest` was entirely thunks and is now zero, and the mint allocator gained the 31 and 14 sites the window had been dropping. The fingerprint guard was calibrated on the old matcher, so it was re-measured: the correct table still wins on both samples, 12 prologues against 7 and 8, with the margin tightening from 2.00x and 1.75x to 1.71x and 1.50x. Both guards are mutation-checked. Dropping the push requirement fails the thunk test; narrowing the window to 32 fails the deep-prologue test.
caverav
added a commit
that referenced
this pull request
Aug 9, 2026
Refusing to call a trampoline by its callee's name was right, but it left the trampoline's own call sites anonymous -- 520 on LocalSend and 696 on Immich -- and made the corrected counts read as a clean improvement when part of the drop was lost naming. The trampoline is still exactly derivable. Its whole body after the slot load is `ldur x16, [x24, #7]` then `br x16`: it pulls the entry point out of the `Code` it just read and branches, never returning, so it is equivalent to the stub. That earns `<stub>Thunk` -- marked, because one of the two guards its tail call with `cmp w0, w22`, and calling it the stub outright would hide the check. The discriminator is the full sequence, not merely loading a stub slot without pushing. An ordinary function that calls a shared stub uses `blr` and carries on afterwards; naming that after the stub it calls is the same false claim, so it stays anonymous. Mutation-checked: accepting any pre-push slot loader as a trampoline fails the test, and the `blr` caller is the pinned negative. Now 14 named per sample, 12 stubs and 2 trampolines. Call sites 21,920 on LocalSend and 26,663 on Immich, above the counts from before the false naming was removed, because the mint allocator the window had been dropping is included too. Dropped `thunk_tests`, subsumed by `trampoline_tests`, which pins the marked name and the `blr` negative rather than only the absence of the bare stub name.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
localsend_app+localsend, andmobile_flutter+mobileValidation
nix develop -c cargo fmt --allnix develop -c cargo test -p flutterdec-corenix develop -c cargo clippy --workspace --all-targets -- -D warnings