summaryrefslogtreecommitdiff
path: root/6
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-02-28 17:47:39 -0800
committerOri Bernstein <ori@eigenstate.org>2016-02-28 17:47:39 -0800
commitbccb73dc9a1d19bf472c9ce776cc6ee76cef05d5 (patch)
tree04139f924dd5e29dc424b78387aa789c2035b871 /6
parent8ecdf73fad606722a6f2c05f53ad619c21bf84de (diff)
downloadmc-bccb73dc9a1d19bf472c9ce776cc6ee76cef05d5.tar.gz
Plan 9 build should now work.
Diffstat (limited to '6')
-rw-r--r--6/gen.c1
-rw-r--r--6/mkfile2
-rw-r--r--6/typeinfo.c10
3 files changed, 6 insertions, 7 deletions
diff --git a/6/gen.c b/6/gen.c
index aac6c0b..a942b9e 100644
--- a/6/gen.c
+++ b/6/gen.c
@@ -139,7 +139,6 @@ char *tydescid(char *buf, size_t bufsz, Type *ty)
p += bprintf(p, end - p, "_tydesc$%s%s%s$%d", ns, sep, ty->name->name.name, ty->tid);
for (i = 0; i < ty->narg; i++)
p += tyidfmt(p, end - p, ty->arg[i]);
- bprintf(p, end - p, "/* %zd */", ty->tid);
} else {
if (file->file.globls->name) {
ns = file->file.globls->name;
diff --git a/6/mkfile b/6/mkfile
index 1806454..34dcd76 100644
--- a/6/mkfile
+++ b/6/mkfile
@@ -18,7 +18,7 @@ OFILES=\
peep.$O\
typeinfo.$O\
-LIB=../parse/libparse.a ../mi/libmi.a
+LIB=../util/libutil.a ../parse/libparse.a ../mi/libmi.a
HFILES=asm.h ../parse/parse.h ../mi/mi.h ../config.h insns.def regs.def
diff --git a/6/typeinfo.c b/6/typeinfo.c
index be34b93..86de4ae 100644
--- a/6/typeinfo.c
+++ b/6/typeinfo.c
@@ -104,7 +104,7 @@ Blob *tydescsub(Type *ty)
char buf[512];
uint8_t tt;
Node *len;
- int isintern;
+ int isextern;
sub = NULL;
nsub = 0;
@@ -181,10 +181,10 @@ Blob *tydescsub(Type *ty)
case Tyname:
i = bprintf(buf, sizeof buf, "%s", Symprefix);
tydescid(buf + i, sizeof buf - i, ty);
- isintern = 0;
- if (types[i]->isreflect && (!types[i]->isimport || types[i]->ishidden))
- isintern = 1;
- lappend(&sub, &nsub, mkblobref(buf, 0, isintern));
+ if (!strcmp("_tydesc$sys$size", buf))
+ printf("vis: %d\n", ty->vis);
+ isextern = ty->isimport || ty->vis != Visintern;
+ lappend(&sub, &nsub, mkblobref(buf, 0, isextern));
break;
}
b = mkblobseq(sub, nsub);