summaryrefslogtreecommitdiff
path: root/6
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-02-28 01:09:11 -0800
committerOri Bernstein <ori@eigenstate.org>2016-02-28 01:09:11 -0800
commit8ecdf73fad606722a6f2c05f53ad619c21bf84de (patch)
treee8c2087c6eb6b2e051af444a10bb24e2716eb47a /6
parent3f457c0c972ce2cdb413a76a05da874d998f2cc2 (diff)
downloadmc-8ecdf73fad606722a6f2c05f53ad619c21bf84de.tar.gz
Plan 9 also needs to dedup types.
Diffstat (limited to '6')
-rw-r--r--6/genp9.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/6/genp9.c b/6/genp9.c
index 9042856..8ad0040 100644
--- a/6/genp9.c
+++ b/6/genp9.c
@@ -387,8 +387,11 @@ static void gentype(FILE *fd, Type *ty)
Blob *b;
char lbl[1024];
- if (ty->type == Tyvar)
+ ty = tydedup(ty);
+ if (ty->type == Tyvar || ty->isemitted)
return;
+
+ ty->isemitted = 1;
b = tydescblob(ty);
if (!b)
return;