booleans, comparisons, and if/else

This commit is contained in:
2026-06-21 20:20:55 +02:00
parent 19e9fbdd4b
commit c90ada608e
13 changed files with 1064 additions and 518 deletions
+15
View File
@@ -95,12 +95,27 @@ Opcode :: enum u8 {
Neg_Checked,
Add_Checked,
Pointer_Add,
Not,
Compare,
Label,
Br,
Cond_Br,
Call,
Trap,
Return,
Return_Void,
}
// Compare_Predicate is stored in Instruction.integer for the Compare opcode.
Compare_Predicate :: enum u8 {
Eq,
Ne,
Lt,
Le,
Gt,
Ge,
}
Instruction :: struct {
span: source.Span,
type: types.Type,