summary refs log tree commit diff
path: root/load.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2020-04-19 16:31:52 -0700
committerQuentin Carbonneaux <quentin@c9x.me>2020-08-06 09:51:12 +0200
commit9de57265ce8453de0f773c48550ca05460844dd1 (patch)
treec6950680b590eb1cb698bed97cc5ef20dda794fa /load.c
parent190263f1b628ba3171309147120fd3ba0e370b42 (diff)
downloadroux-9de57265ce8453de0f773c48550ca05460844dd1.tar.gz
Use a dynamic array for phi arguments
Diffstat (limited to 'load.c')
-rw-r--r--load.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/load.c b/load.c
index 8e2dd64..ae9cfcf 100644
--- a/load.c
+++ b/load.c
@@ -330,6 +330,8 @@ def(Slice sl, bits msk, Blk *b, Ins *i, Loc *il)
 	p->to = r;
 	p->cls = sl.cls;
 	p->narg = b->npred;
+	p->arg = vnew(p->narg, sizeof p->arg[0], Pfn);
+	p->blk = vnew(p->narg, sizeof p->blk[0], Pfn);
 	for (np=0; np<b->npred; ++np) {
 		bp = b->pred[np];
 		if (!bp->s2