Skip to content

Improve NoreturnContractCheck#441

Merged
cirras merged 7 commits into
masterfrom
no-return-except-block
May 22, 2026
Merged

Improve NoreturnContractCheck#441
cirras merged 7 commits into
masterfrom
no-return-except-block

Conversation

@jgardn3r
Copy link
Copy Markdown
Collaborator

  • Introduce RoutineExit type to control flow graph types
  • Remove ControlFlowGraph::getExitBlock
  • Fix CFG construction of Continue and Break around try finally
  • Ensure RoutineExit block is always id 0
  • Replace AssertJ withFailMessage with as in CFG BlockChecker
  • Add ExceptionalRoutineExit to appropriate ControlFlowGraphs
  • Improve NoreturnContractCheck

jgardn3r added 5 commits May 12, 2026 11:38
This is to facilitate the distinction between routine exits and
exceptional exits from a control flow graph.
This is being removed in favour of the type system and a more generic
approach to block identification. Additionally, there may be more than
one exit block in a CFG.
This fixes a bug that allowed loop control flow statements to be used
inside `try finally` statements with the existance of a loop.
@jgardn3r jgardn3r requested a review from cirras May 12, 2026 01:39
@jgardn3r jgardn3r force-pushed the no-return-except-block branch from 33df283 to da15b24 Compare May 13, 2026 01:47
@jgardn3r jgardn3r requested a review from cirras May 13, 2026 01:48
Copy link
Copy Markdown
Collaborator

@cirras cirras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍

@cirras cirras merged commit cdc7e99 into master May 22, 2026
4 checks passed
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.

2 participants