module Savi::Compiler::Jumps
Overview
The purpose of the Jumps pass is to analyze control flow branches that jump away without giving a value. Such expressions have no value and no type, which is important to know in the Infer and CodeGen pass. This information is also used to analyze error handling completeness and partial functions.
This pass does not mutate the Program topology. This pass sets flags on AST nodes but does not otherwise mutate ASTs. This pass does not raise any compilation errors. This pass keeps temporary state (on the stack) at the per-function level. This pass produces no output state.
Defined in:
savi/compiler/jumps.crConstant Summary
-
FLAG_ALWAYS_BREAK =
16_u8
-
FLAG_ALWAYS_CONTINUE =
64_u8
-
FLAG_ALWAYS_ERROR =
1_u8
-
FLAG_ALWAYS_RETURN =
4_u8
-
FLAG_MAYBE_BREAK =
32_u8
-
FLAG_MAYBE_CONTINUE =
128_u8
-
FLAG_MAYBE_ERROR =
2_u8
-
FLAG_MAYBE_RETURN =
8_u8