diff options
Diffstat (limited to 'src/lower.c')
-rw-r--r-- | src/lower.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lower.c b/src/lower.c index 1949bd5..af9f9d4 100644 --- a/src/lower.c +++ b/src/lower.c @@ -605,6 +605,9 @@ static void lower_global_var(struct fn *f, struct ast *n) { static void add_proc(struct ast *n) { size_t idx = vec_len(&fns); + /* global locs are effectively just indexes, so this is a nifty way to + * encode the procedure index into the AST for later use by + * lower_proc_call and so on */ n->l = build_global_loc(idx); struct fn f = {.name = proc_id(n), .idx = idx, |