Skip to content

codegen: remove dead else branch; narrow ps2_recompiled_functions.h include#110

Closed
jlsandri wants to merge 1 commit intoran-j:mainfrom
jlsandri:pr/codegen-dead-else-cleanup
Closed

codegen: remove dead else branch; narrow ps2_recompiled_functions.h include#110
jlsandri wants to merge 1 commit intoran-j:mainfrom
jlsandri:pr/codegen-dead-else-cleanup

Conversation

@jlsandri
Copy link
Copy Markdown

@jlsandri jlsandri commented Apr 6, 2026

Small cleanup, no behavioural change.

Changes

  1. Remove dead else branch in the call-emission path of code_generator.cpp. The preceding if always returns or falls through in a way that makes the else unreachable.
  2. Stop including ps2_recompiled_functions.h in every generated translation unit. The header is only consumed by register_functions.cpp, so including it in each generated TU was pure parse-time overhead with no functional effect.

Scope

  • ps2xRecomp/src/lib/code_generator.cpp: +13 / -21

Rationale

Tidy-up discovered while working on larger codegen changes in follow-up PRs. Split out as its own PR to keep the review diff minimal and to unblock the follow-ups that touch the same file.

@jlsandri jlsandri force-pushed the pr/codegen-dead-else-cleanup branch from 04a04db to 7cf34c5 Compare April 6, 2026 08:56
@jlsandri
Copy link
Copy Markdown
Author

jlsandri commented Apr 6, 2026

Closing as part of a batch cleanup after #107 landed. The runtime ecosystem refactor in #107 substantially reworked the files this PR touched, and I would like to re-audit the underlying fix against the new code structure before putting it back in front of you. If the fix is still needed after that re-audit, I will re-open as a focused PR rebased onto current main. Thanks for your patience.

@jlsandri jlsandri closed this Apr 6, 2026
@jlsandri jlsandri deleted the pr/codegen-dead-else-cleanup branch April 6, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant