summaryrefslogtreecommitdiff
path: root/parse/dump.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-12-18 23:30:37 -0800
committerOri Bernstein <ori@eigenstate.org>2014-12-18 23:32:19 -0800
commitb1eb90e0d575a1016ef176a8cea9735e5420fb8a (patch)
tree0d50d5597e7ee37048c18e710f5dc66f818cc0b5 /parse/dump.c
parent23f37b9d690c2c40819606a0e8be63c7206bfc1e (diff)
downloadmc-b1eb90e0d575a1016ef176a8cea9735e5420fb8a.tar.gz
Get rid of the 'exports' stab.
This should simplify a number of chunks of code.
Diffstat (limited to 'parse/dump.c')
-rw-r--r--parse/dump.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/parse/dump.c b/parse/dump.c
index 6b6c40d..73586ad 100644
--- a/parse/dump.c
+++ b/parse/dump.c
@@ -55,7 +55,7 @@ static void outstab(Stab *st, FILE *fd, int depth)
char *ty;
Type *t;
- findentf(fd, depth, "Stab %p (super = %p, name=\"%s\")\n", st, st->super, namestr(st->name));
+ findentf(fd, depth, "Stab %p (super = %p, name=\"%s\")\n", st, st->super, st->ns);
if (!st)
return;
@@ -66,7 +66,10 @@ static void outstab(Stab *st, FILE *fd, int depth)
/* already indented */
outname(k[i], fd);
t = gettype(st, k[i]);
- ty = tystr(t);
+ if (t->nsub)
+ ty = tystr(t->sub[0]);
+ else
+ ty = strdup("none");
fprintf(fd, " = %s [tid=%d]\n", ty, t->tid);
free(ty);
}
@@ -116,8 +119,6 @@ static void outnode(Node *n, FILE *fd, int depth)
fprintf(fd, "(name = %s)\n", n->file.files[0]);
findentf(fd, depth + 1, "Globls:\n");
outstab(n->file.globls, fd, depth + 2);
- findentf(fd, depth + 1, "Exports:\n");
- outstab(n->file.exports, fd, depth + 2);
for (i = 0; i < n->file.nuses; i++)
outnode(n->file.uses[i], fd, depth + 1);
for (i = 0; i < n->file.nstmts; i++)