summaryrefslogtreecommitdiff
path: root/parse/specialize.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse/specialize.c')
-rw-r--r--parse/specialize.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/parse/specialize.c b/parse/specialize.c
index 3cb332b..1e23065 100644
--- a/parse/specialize.c
+++ b/parse/specialize.c
@@ -145,7 +145,11 @@ static void fixup(Node *n)
case Nlit:
switch (n->lit.littype) {
case Lfunc: fixup(n->lit.fnval); break;
- case Lseq:
+ case Larray:
+ for (i = 0; i < n->lit.nelt; i++)
+ fixup(n->lit.seqval[i]);
+ break;
+ case Lstruct:
for (i = 0; i < n->lit.nelt; i++)
fixup(n->lit.seqval[i]);
break;
@@ -237,7 +241,12 @@ static Node *specializenode(Node *n, Htab *tsmap)
case Llbl: r->lit.lblval = n->lit.lblval; break;
case Lbool: r->lit.boolval = n->lit.boolval; break;
case Lfunc: r->lit.fnval = specializenode(n->lit.fnval, tsmap); break;
- case Lseq:
+ case Larray:
+ r->lit.seqval = xalloc(n->lit.nelt * sizeof(Node*));
+ for (i = 0; i < n->lit.nelt; i++)
+ r->lit.seqval[i] = specializenode(n->lit.seqval[i], tsmap);
+ break;
+ case Lstruct:
r->lit.seqval = xalloc(n->lit.nelt * sizeof(Node*));
for (i = 0; i < n->lit.nelt; i++)
r->lit.seqval[i] = specializenode(n->lit.seqval[i], tsmap);