decomp: reconstruct AddressEdit balloon construction #1009

Merged
coah80 merged 1 commits from agent/bittle/address-balloon-construction into main 2026-10-03 00:54:25 +00:00
coah80 commented 2026-10-03 00:52:31 +00:00 (Migrated from github.com)

Source reconstruction

Replace the hard-coded raw allocation and placement-new sequence with an ordinary typed TextBalloon new-expression. Preserve the two real aspect-ratio margins and constant-pool order. This removes the extra compiled null guard; the unused allocator-symbol declaration is removed.

Independent verification

  • create: 97.44634% → 97.5561%; source 820 → 818 instructions, target 820. Two other address-retention instructions remain missing, so this is still partial
  • Unit fuzzy: 99.53954% → 99.55282%; 91/94 exact functions, code 23344/27112 and data 2560/2560 preserved
  • All 1027 source objects compared: only AddressEdit .text changes; all non-text bytes and normalized relocations unchanged; no report regressions
  • All 91 exact functions retain ctxdiff zero; pool 57/57 identical; ordinary literal audit checks 50 arguments
  • Additional ordinal call audit: create preserves 143 ordered calls and 107 resolved literal arguments; get_friendinfo preserves 13 calls and two literal arguments
  • Parent reran 32 ASan/UBSan construction cases with actual extracted source blocks, covering allocation success/null, constructor arguments, side effects and member publication
  • Native allocator/class layout is modeled; actual target allocation size and helper ABI are checked in the PPC object. No Wii UI runtime test claimed
  • Full 43U all_source/report/progress/DOL and worktree/diff checks pass

No header, data layout, metadata or linking changes; no new exact function claimed.

Parent baseline: e5987de5ad
Tested tree: c8064d8f4b
DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d

No merge performed or requested by this author.

Note

Replace manual balloon allocation with direct new in AddressEdit

Rebuilds the balloon construction in the create-mode completion routine of iplAddressEdit.cpp. The balloon is now allocated and constructed in one new expression using the same heap, resource, layout, position, and margin values, with margins named for the 4:3 and 16:9 cases. Behavioral Change: with throwing allocation semantics, allocation failure no longer leaves mpBalloon null from this code path; the old null check and placement-construction sequence are removed.

Macroscope summarized 4954d6e.

## Source reconstruction Replace the hard-coded raw allocation and placement-new sequence with an ordinary typed TextBalloon new-expression. Preserve the two real aspect-ratio margins and constant-pool order. This removes the extra compiled null guard; the unused allocator-symbol declaration is removed. ## Independent verification - create: 97.44634% → 97.5561%; source 820 → 818 instructions, target 820. Two other address-retention instructions remain missing, so this is still partial - Unit fuzzy: 99.53954% → 99.55282%; 91/94 exact functions, code 23344/27112 and data 2560/2560 preserved - All 1027 source objects compared: only AddressEdit .text changes; all non-text bytes and normalized relocations unchanged; no report regressions - All 91 exact functions retain ctxdiff zero; pool 57/57 identical; ordinary literal audit checks 50 arguments - Additional ordinal call audit: create preserves 143 ordered calls and 107 resolved literal arguments; get_friendinfo preserves 13 calls and two literal arguments - Parent reran 32 ASan/UBSan construction cases with actual extracted source blocks, covering allocation success/null, constructor arguments, side effects and member publication - Native allocator/class layout is modeled; actual target allocation size and helper ABI are checked in the PPC object. No Wii UI runtime test claimed - Full 43U all_source/report/progress/DOL and worktree/diff checks pass No header, data layout, metadata or linking changes; no new exact function claimed. Parent baseline: e5987de5ad1d0b4adb5a5cbc388f7a1dc561001b Tested tree: c8064d8f4b47c724b570250f23a433ddea07d8a8 DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d No merge performed or requested by this author. <!-- 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] > ### Replace manual balloon allocation with direct `new` in `AddressEdit` > Rebuilds the balloon construction in the create-mode completion routine of [iplAddressEdit.cpp](https://github.com/coah80/wii-ipl/pull/1009/files#diff-66a27b13bda271223ec7294c9e6377128492e75203c03479e31956da5d204bd1). The balloon is now allocated and constructed in one `new` expression using the same heap, resource, layout, position, and margin values, with margins named for the 4:3 and 16:9 cases. Behavioral Change: with throwing allocation semantics, allocation failure no longer leaves `mpBalloon` null from this code path; the old null check and placement-construction sequence are removed. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 4954d6e.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 00:54:23 +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.