Skip to content

Navigation Menu

Sign in
Sign up

feat: add branch termination check & crashes #97

Open

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

  • Status
    Todo Later

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    AltStyle によって変換されたページ (->オリジナル) /