Skip to content

Add integer lifetime, callee prototype, and branch layout repairs - #141

Merged
RetroGameDeveloper merged 2 commits into
mainfrom
feat/integer-and-call-layout-repairs
Oct 29, 2026
Merged

RetroGameDeveloper merged 2 commits into
mainfrom
feat/integer-and-call-layout-repairs

Conversation

@RetroGameDeveloper

@RetroGameDeveloper RetroGameDeveloper commented Oct 28, 2026 •

Copy link
Copy Markdown

Summary

  • Add bounded local integer widening, candidate-owned callee prototype repairs, integer lifetime splits/merges, and branch/call/goto/switch layout candidates.
  • Share them through autopilot, the permuter, iterative/deep search, and explicit try_local_repairs families in both ROM and imported-project modes.
  • Prioritize relevant families using mismatch evidence; document bounds and limitations.

Safeguards

  • No shared header writes, compiler downloads, AI requests, judge changes, or edits to matched functions.
  • Reject unsupported shadows, escaped locals, conditional/ambiguous prototypes, unsafe fallthrough, and loop/jump crossings where applicable.
  • These are compiler-checked hypotheses, not a proof of equivalence. Improved scores stay drafts; only the existing exact judge accepts matches.

Validation

  • 41 focused tests, including real pinned MIPS compiler checks recovering exact objects for synthetic local-width and callee-prototype mistakes.
  • Shared candidate generation checked for MIPS, PowerPC, x86, ARM, and Thumb; explicit local repair path checked in ROM and imported-project modes.
  • Private regional racing-game replay: 114 unique compiler/judge trials, zero compile failures. Earlier 966-instruction candidate improved from 90.34% to 92.16% (score 9329 to 7574) through terminal-leaf duplication, lifetime merging, and branch-call distribution. Latest 96.57% candidate retained unchanged; no new exact match. No game code/data is included here.
  • Full local suite: 2084 passed, 156 skipped (543 seconds), using installed pinned compilers and the open-source demo prerequisites. Ruff, git diff --check, and node tests/gui_progress.js pass.
  • GitHub Linux and Windows checks pass; macOS jobs are still pending at the time of this update.
  • macOS application package builds successfully.

Limits

This is a bounded local search, not exhaustive CFG reconstruction or all possible C programs. Prototype edits are limited to declarations inside the submitted source; conflicting shared declarations still need review. Search budgets still apply.

@github-actions github-actions Bot added the enhancement New feature or request label Oct 28, 2026
@RetroGameDeveloper
RetroGameDeveloper merged commit 96922cf into main Oct 29, 2026
8 checks passed
RetroGameDeveloper pushed a commit that referenced this pull request Oct 30, 2026
…r code changes (#141)

A function matches only when the compiler's output is the same byte for byte.
A contributors need to know which Visual C++ builds decompdecomp has, how the
import picks one from the Rich header, and which updates changed the code most.
The page lists the documented changes (from Microsoft's own sources) and the
builds that would help next. The guide's Windows PC section links to it.

Co-authored-by: risner <8061434+risner@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant