bitwise operations

This commit is contained in:
2026-07-19 00:36:31 +02:00
parent f9448363e4
commit c7e3162ecb
21 changed files with 219439 additions and 140077 deletions
+14 -1
View File
@@ -110,6 +110,7 @@ Expr_Kind :: enum u8 {
Decay_Array_Pointer,
Negate,
Not,
Bit_Not,
Add,
Sub,
Mul,
@@ -121,6 +122,12 @@ Expr_Kind :: enum u8 {
Rem,
Mod,
Pointer_Add,
Bit_And,
Bit_Or,
Bit_Xor,
Shift_Left,
Shift_Right,
Shift_Left_Saturating,
Eq,
Ne,
Lt,
@@ -192,6 +199,12 @@ Assignment_Op :: enum u8 {
Mul,
Div,
Pointer_Add,
Bit_And,
Bit_Or,
Bit_Xor,
Shift_Left,
Shift_Right,
Shift_Left_Saturating,
}
Stmt :: struct {
@@ -206,7 +219,7 @@ Stmt :: struct {
expr: Expr_Id,
iterator_type: types.Type,
pointer_capture: bool,
// Assignments carry their operation explicitly. Arithmetic operations lower
// Assignments carry their operation explicitly. Compound operations lower
// by computing the target address once, loading its current value, applying
// the operation to `expr`, and storing through the original address.
assignment_op: Assignment_Op,