Skip to content

feat: add branch termination check & crashes #97

@Zffu

Description

@Zffu

Add the necessary things in order to make sure that every function ends with a termination statement that follows:

  • return statement: Returns a value. Can be suppressed if the block doesn't return anything
  • crash statement: Crashes the program instantly, doesn't cleanly unroll values.
  • branch jump: Jumps to another branch/block

Furthermore, add MIR checks to make sure that every block ends with a termination statement. This is to guarantee behavior and allow LLVM and other bridges to fully optimize stuff

A crash can be done trough the following:

crash("This program will crash now");

A crash will instantly crash the program and exit it

Metadata

Metadata

Assignees

Projects

Status

Todo this release

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions