summaryrefslogtreecommitdiff
path: root/ir.h
diff options
context:
space:
mode:
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);