bitwise operations
This commit is contained in:
+14
-1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user