diff options
| author | WormHeamer | 2025-08-04 17:38:23 -0400 |
|---|---|---|
| committer | WormHeamer | 2025-08-04 17:38:23 -0400 |
| commit | 22aa7559a37c49def05e8a43b12561b17a4af258 (patch) | |
| tree | 028a9a9883cbc54ec21ed0332c77d838bda6a9b8 /ir.h | |
| parent | 3db2e548d80d0bfa213d0df73833b1b1b4e0a4f7 (diff) | |
make NodeInputs statically sized, peephole a + ~a and a ^ ~a
Diffstat (limited to 'ir.h')
| -rw-r--r-- | ir.h | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -62,6 +62,15 @@ typedef enum { const char *node_type_name(NodeType t); +#define NODE_INPUT_MAX 2 + +typedef struct { + struct Node *data[NODE_INPUT_MAX]; + ptrdiff_t len; +} NodeInputs; + +typedef DYNARR(struct Node *) NodeOutputs; + typedef struct Node { union { struct Node *prev_free; @@ -70,7 +79,8 @@ typedef struct Node { int walked; NodeType type; LexSpan src_pos; - DYNARR(struct Node *) in, out; + NodeInputs in; + NodeOutputs out; Value val; }; }; |
