From 9c8861a1ad58954f40d599c83405c720e0d2e07b Mon Sep 17 00:00:00 2001 From: WormHeamer Date: Thu, 7 Aug 2025 04:20:47 -0400 Subject: fix region nodes being culled prematurely --- ir.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ir.h') diff --git a/ir.h b/ir.h index c7fa118..cba0bcc 100644 --- a/ir.h +++ b/ir.h @@ -20,7 +20,8 @@ typedef enum { T_NONE, T_TUPLE, T_BOOL, - T_INT + T_INT, + T_PTR } BaseType; typedef struct Type { @@ -114,6 +115,7 @@ typedef struct { Str name; Node *start, *stop, *ctrl, *keepalive; Node *free_list; + Type ret_type; Scope scope; } Proc; @@ -152,7 +154,7 @@ ScopeFrame *scope_push(Scope *scope, Proc *proc); ScopeFrame *scope_pop(Scope *scope, Proc *proc); NameBinding *scope_find(Scope *scope, Str name); NameBinding *scope_bind(Scope *scope, Str name, Node *value, LexSpan pos, Proc *proc); -NameBinding *scope_update(Scope *scope, Str name, Node *to, Proc *proc); +NameBinding *scope_update(NameBinding *b, Node *to, Proc *proc); void scope_collect(Scope *scope, Proc *proc, ScopeNameList *nl, Arena *arena); void scope_uncollect(Scope *scope, Proc *proc, ScopeNameList *nl); -- cgit v1.2.3