summaryrefslogtreecommitdiff
path: root/ir.h
diff options
context:
space:
mode:
authorWormHeamer2025-10-28 18:42:28 -0400
committerWormHeamer2025-10-28 18:42:28 -0400
commit8b407058485dbad82d670c6cbcacbe1d993fb4aa (patch)
tree7505a078a572ee8c96f0712a9aa3e1efd3494715 /ir.h
parentae9a859b306e88e0324c30d3bc9f67aa6c24bd3f (diff)
remove Node.walked in favor of bit sets (1/32x the memory)HEADmaster
Diffstat (limited to 'ir.h')
-rw-r--r--ir.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/ir.h b/ir.h
index ae91b6c..403e054 100644
--- a/ir.h
+++ b/ir.h
@@ -110,21 +110,20 @@ typedef struct {
} NodeList;
typedef struct Node {
+ u32 id;
+ NodeType op;
union {
struct Node *prev_free;
struct {
- NodeList in; /* note: index 0 used for control flow */
- NodeList out;
- int walked;
- LexSpan src_pos;
- union {
- Type type;
- Value val;
- };
+ /* index 0 of in is control */
+ NodeList in, out;
};
};
- int id;
- NodeType op;
+ LexSpan src_pos;
+ union {
+ Type type;
+ Value val;
+ };
} Node;
/* convenience macros (lisp-inspired lol) */