summaryrefslogtreecommitdiff
path: root/proc.h
diff options
context:
space:
mode:
Diffstat (limited to 'proc.h')
-rw-r--r--proc.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/proc.h b/proc.h
index b95c149..addc192 100644
--- a/proc.h
+++ b/proc.h
@@ -4,6 +4,8 @@
#include "ir.h"
#include "xar.h"
+/* TODO: use a hash trie instead of linked list? */
+
typedef struct NameBinding {
struct NameBinding *prev;
LexSpan src_pos;
@@ -12,11 +14,6 @@ typedef struct NameBinding {
unsigned nestlvl;
} NameBinding;
-typedef struct ScopeFrame {
- struct ScopeFrame *prev;
- NameBinding *latest;
-} ScopeFrame;
-
typedef struct {
NameBinding *bind;
Node *from, *to;
@@ -28,6 +25,11 @@ typedef struct ScopeChangeList {
Arena *arena;
} ScopeChangeList;
+typedef struct ScopeFrame {
+ struct ScopeFrame *prev;
+ NameBinding *latest;
+} ScopeFrame;
+
typedef struct {
Arena *arena;
ScopeFrame *tail, *free_scope;