Match CHANSVmParseInt with a read-only input object #793

Merged
coah80 merged 1 commits from agent/bittle/chans-const-parser into main 2026-10-02 10:08:34 +00:00
coah80 commented 2026-10-02 10:07:55 +00:00 (Migrated from github.com)

One-line source change: make CHANSVmParseInt's borrowed input object const. The helper only reads the object's type/string fields; its output is written through the separate out parameter. No body changes, casts, shared headers, volatile/register hints, assembly, or compiler options.

Exact result

  • CHANSVmParseInt: 49/49 instructions, 3 prologue differences -> 0. The endpoint initialization and argument moves now have the target order.
  • CHANSVm: 220/233 -> 221/233 instruction-exact functions; 37,412 -> 37,608 matched code bytes (+196).
  • Data remains 6,904/6,904; all other function bodies are byte-unchanged.
  • This is a focused partial-unit improvement. The remaining 12 functions are still open, CHANSVm remains NonMatching, and no linkage gain or whole-unit completion is claimed.

Verification after rebase on 86cda2adbe

  • Full 43U all_source/progress/report/ok build passes; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d.
  • All 1,027-object audit: only CHANSVm .text changes, same 53,564-byte size and same 1,396 relocations. Ten changed bytes are confined to ParseInt instruction positions 7,8,10. All other allocated bytes/relocations are unchanged.
  • Pool 125/125 identical. Literal-reference audit: 221 functions, 32 compared arguments, no candidates/errors/skips.
  • Interpreter jump tables 121/121 and formatter tables 89/89 destinations unchanged/exact.
  • Tests: workflow 8, literal 36, jump-table 27, pool 8 pass. Diff/worktree checks and global link-address audit pass.
  • Published tree c6919a134e matches the tested local tree.

Draft for review; no merge performed.

Note

Make CHANSVmParseInt take a read-only object-header pointer

Changes the object parameter of CHANSVmParseInt in CHANSVm.c from a mutable object-header pointer to a pointer to const object-header data. The parsing logic is unchanged.

Macroscope summarized 5314ae3.

One-line source change: make CHANSVmParseInt's borrowed input object const. The helper only reads the object's type/string fields; its output is written through the separate out parameter. No body changes, casts, shared headers, volatile/register hints, assembly, or compiler options. ## Exact result - CHANSVmParseInt: 49/49 instructions, 3 prologue differences -> 0. The endpoint initialization and argument moves now have the target order. - CHANSVm: 220/233 -> 221/233 instruction-exact functions; 37,412 -> 37,608 matched code bytes (+196). - Data remains 6,904/6,904; all other function bodies are byte-unchanged. - This is a focused partial-unit improvement. The remaining 12 functions are still open, CHANSVm remains NonMatching, and no linkage gain or whole-unit completion is claimed. ## Verification after rebase on 86cda2adbe76aa9f88a73596ff6938bdc416fdeb - Full 43U all_source/progress/report/ok build passes; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. - All 1,027-object audit: only CHANSVm .text changes, same 53,564-byte size and same 1,396 relocations. Ten changed bytes are confined to ParseInt instruction positions 7,8,10. All other allocated bytes/relocations are unchanged. - Pool 125/125 identical. Literal-reference audit: 221 functions, 32 compared arguments, no candidates/errors/skips. - Interpreter jump tables 121/121 and formatter tables 89/89 destinations unchanged/exact. - Tests: workflow 8, literal 36, jump-table 27, pool 8 pass. Diff/worktree checks and global link-address audit pass. - Published tree c6919a134ed4a0f5de4092ab25be7eeedbc0e9ac matches the tested local tree. Draft for review; no merge performed. <!-- 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] > ### Make `CHANSVmParseInt` take a read-only object-header pointer > Changes the object parameter of `CHANSVmParseInt` in [CHANSVm.c](https://github.com/coah80/wii-ipl/pull/793/files#diff-fcd94241dcc82f12e50e6a224211f94b32d8c83c08ab0880c20261cea99b4f75) from a mutable object-header pointer to a pointer to const object-header data. The parsing logic is unchanged. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 5314ae3.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-02 10:08:32 +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.