diff options
author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-04-27 00:09:48 +0300 |
---|---|---|
committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-04-27 00:09:48 +0300 |
commit | 515ad657ec6ef685c9c91479540518a0091f1516 (patch) | |
tree | 68b5ae0e8d83bcc7bd1bd6b84648780729e20f9b /src/lower.c | |
parent | 966f97ad7c92f559ae54d0214db90c370e3b48eb (diff) | |
download | posthaste-515ad657ec6ef685c9c91479540518a0091f1516.tar.gz posthaste-515ad657ec6ef685c9c91479540518a0091f1516.zip |
documentation
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, |