Skip to content

[#928] Impl producing compiler error when required return is missing#958

Open
evgTSV wants to merge 2 commits intoForNeVeR:mainfrom
evgTSV:return-checker
Open

[#928] Impl producing compiler error when required return is missing#958
evgTSV wants to merge 2 commits intoForNeVeR:mainfrom
evgTSV:return-checker

Conversation

@evgTSV
Copy link
Contributor

@evgTSV evgTSV commented Feb 18, 2026

Closes #928

Right now the compiler can handle missing returns. Moreover, it can evaluate the value of a conditional statement (if it's constant) to determine whether it's necessary or redundant in order to drop unreachable paths. As a result, codegen has become simpler.

Besides, I've reworked a sequence of statements in the do..while loop. This allowed for easier optimization of the generated code, since the statements are now in the proper order.

Also, there is a TODO: I assume we should evaluate NULL literals in the future.

… optimize codegen for constan values for if/else, while/do..while. Enhance do..while codegen. Improve the ConstantEvaluator. Add tests.
@ForNeVeR ForNeVeR requested a review from kant2002 February 18, 2026 23:32
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.

Produce compiler error when required return is missing

1 participant