decomp(keyboard): group animation traversal declarations #1065

Merged
coah80 merged 1 commits from agent/bittle/candidate-declarations-review into main 2026-10-03 06:16:15 +00:00
coah80 commented 2026-10-03 06:15:31 +00:00 (Migrated from github.com)

Small declaration/lifetime gain

Move the existing uninitialized u16 i/j declarations before pane; both zero assignments remain at their original loop entries. This widens trivial scalar lexical scope only. No variable is added, neither address escapes, neither is used outside its original loop, and all reads are dominated by the same assignment.

  • createAnmPane: 98.31019% → 98.37963%, 216/216 instructions; frame 0x50
  • Unit: 99.502335% → 99.50484%; 109/112 exact and 4,652/4,652 reported data preserved
  • Historical 98.541664% was not reproduced and is not claimed

Independent verification

Base b7a06e9d82e35cda3de92a6135db491000722791; tested tree 0dc709c550.

  • Full 43U build/progress/report/DOL passed; all 1,027 units compared, only this function's fuzzy changes
  • Source-scope proof verifies no shadowing, address escape, initializer motion or use before assignment
  • All 216 instructions correspond under one callee-saved GPR bijection; fixed call arguments, branches, loads/stores and ordering unchanged
  • All 161 other emitted bodies, allocated nontext payloads and relocation sections byte-identical
  • Pool 57/57 identical; literal audit 111 functions/27 arguments, no candidates/errors; pre-existing create unequal extent skipped
  • DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d; worktree/diff checks pass

Partial fuzzy gain under the repository's declaration-order workflow. No new exact-function or linking claim; pre-existing section extent differences remain. No new locals, casts, compiler settings or headers.

Note

Move animation loop counters to method scope in createAnmPane_

Hoists the two loop counter declarations from the for initializers to the top of createAnmPane_ in tiCandidateBox.cpp, reusing them across the pane-construction loop and each pane's animation loop. No behavior change.

Macroscope summarized 5709150.

## Small declaration/lifetime gain Move the existing uninitialized u16 i/j declarations before pane; both zero assignments remain at their original loop entries. This widens trivial scalar lexical scope only. No variable is added, neither address escapes, neither is used outside its original loop, and all reads are dominated by the same assignment. - createAnmPane: 98.31019% → 98.37963%, 216/216 instructions; frame 0x50 - Unit: 99.502335% → 99.50484%; 109/112 exact and 4,652/4,652 reported data preserved - Historical 98.541664% was not reproduced and is not claimed ## Independent verification Base b7a06e9d82e35cda3de92a6135db491000722791; tested tree 0dc709c550ead04814fcd9d4fdeb8c4f9070d852. - Full 43U build/progress/report/DOL passed; all 1,027 units compared, only this function's fuzzy changes - Source-scope proof verifies no shadowing, address escape, initializer motion or use before assignment - All 216 instructions correspond under one callee-saved GPR bijection; fixed call arguments, branches, loads/stores and ordering unchanged - All 161 other emitted bodies, allocated nontext payloads and relocation sections byte-identical - Pool 57/57 identical; literal audit 111 functions/27 arguments, no candidates/errors; pre-existing create unequal extent skipped - DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d; worktree/diff checks pass Partial fuzzy gain under the repository's declaration-order workflow. No new exact-function or linking claim; pre-existing section extent differences remain. No new locals, casts, compiler settings or headers. <!-- Macroscope's pull request summary starts here --> <!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. --> <!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. --> > [!NOTE] > ### Move animation loop counters to method scope in `createAnmPane_` > Hoists the two loop counter declarations from the `for` initializers to the top of `createAnmPane_` in [tiCandidateBox.cpp](https://github.com/coah80/wii-ipl/pull/1065/files#diff-d09edda016b1f8deb10d254572fee84552970820d3f9770998fa3b2b445ee047), reusing them across the pane-construction loop and each pane's animation loop. No behavior change. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 5709150.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 06:16:13 +00:00 (Migrated from github.com)

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.
Sign in to join this conversation.