summaryrefslogtreecommitdiff
path: root/ir.h
diff options
context:
space:
mode:
authorWormHeamer2025-08-07 04:20:47 -0400
committerWormHeamer2025-08-07 04:20:47 -0400
commit9c8861a1ad58954f40d599c83405c720e0d2e07b (patch)
tree0e32a2007a3e5e130ba910d8d06d8d6d4c2930c6 /ir.h
parent739b4852d2a826ba2985c7db2f5c778050f72250 (diff)
fix region nodes being culled prematurely
Diffstat (limited to 'ir.h')
-rw-r--r--ir.h6
1 files changed, 4 insertions, 2 deletions
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);