diff options
| author | 2026-03-18 11:33:41 +0100 | |
|---|---|---|
| committer | 2026-03-18 11:33:41 +0100 | |
| commit | 1d9e19fb3bb941cdc28e9d4c3063d3e213fd8312 (patch) | |
| tree | e18eddb587f91455a439c0fd4f1bb3b3216ea2df /src/ir_fold.c | |
| parent | 1fee6a61abdf2cf332fffbc50bf7adc1842feb40 (diff) | |
Refactor: use typedefs and CamelCase for aggregate types
Looks nicer
Diffstat (limited to 'src/ir_fold.c')
| -rw-r--r-- | src/ir_fold.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ir_fold.c b/src/ir_fold.c index a7b5c6e..9f0ff72 100644 --- a/src/ir_fold.c +++ b/src/ir_fold.c @@ -5,8 +5,8 @@ #ifdef __clang__ __attribute__((no_sanitize("float-cast-overflow"))) /* silence UBsan for float->int overflow */ #endif -static union ref -foldint(enum op op, enum irclass k, union ref lr, union ref rr) +static Ref +foldint(enum op op, enum irclass k, Ref lr, Ref rr) { vlong x; union { @@ -71,8 +71,8 @@ foldint(enum op op, enum irclass k, union ref lr, union ref rr) return mkintcon(k, x); } -static union ref -foldflt(enum op op, enum irclass k, union ref lr, union ref rr) +static Ref +foldflt(enum op op, enum irclass k, Ref lr, Ref rr) { int xi; double x, l = fltconval(lr), r = fltconval(rr); @@ -103,7 +103,7 @@ foldflt(enum op op, enum irclass k, union ref lr, union ref rr) } bool -foldbinop(union ref *to, enum op op, enum irclass k, union ref l, union ref r) +foldbinop(Ref *to, enum op op, enum irclass k, Ref l, Ref r) { if (!oisarith(op)) return 0; @@ -118,7 +118,7 @@ foldbinop(union ref *to, enum op op, enum irclass k, union ref l, union ref r) } bool -foldunop(union ref *to, enum op op, enum irclass k, union ref a) +foldunop(Ref *to, enum op op, enum irclass k, Ref a) { if (!isnumcon(a)) return 0; if (op != Ocopy && !oisarith(op)) |