summaryrefslogtreecommitdiff
path: root/parse/dump.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-09-24 22:39:28 -0700
committerOri Bernstein <ori@eigenstate.org>2015-09-24 22:39:28 -0700
commitdd1dcc663ada21c70e41003564e5c57d671981ac (patch)
treebad8899e9198efafed8684be842521f1e60ae4d1 /parse/dump.c
parent53bc10145695df7160e374bca21f4a9510e3fd7d (diff)
downloadmc-dd1dcc663ada21c70e41003564e5c57d671981ac.tar.gz
Put the closure at the function level.
Diffstat (limited to 'parse/dump.c')
-rw-r--r--parse/dump.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/parse/dump.c b/parse/dump.c
index 39d4ae5..92dc99b 100644
--- a/parse/dump.c
+++ b/parse/dump.c
@@ -52,11 +52,15 @@ void dumpsym(Node *s, FILE *fd)
static void outstab(Stab *st, FILE *fd, int depth)
{
size_t i, n;
+ char *name;
void **k;
char *ty;
Type *t;
- findentf(fd, depth, "Stab %p (super = %p, name=\"%s\")\n", st, st->super, st->name);
+ name = "";
+ if (st->name)
+ name = st->name;
+ findentf(fd, depth, "Stab %p (super = %p, name=\"%s\")\n", st, st->super, name);
if (!st)
return;
@@ -86,12 +90,12 @@ static void outstab(Stab *st, FILE *fd, int depth)
free(k);
/* dump closure */
- if (st->closure) {
- k = htkeys(st->closure, &n);
+ if (st->env) {
+ k = htkeys(st->env, &n);
for (i = 0; i < n; i++) {
findentf(fd, depth + 1, "U ");
/* already indented */
- outsym(getdcl(st, k[i]), fd, 0);
+ outsym(getclosed(st, k[i]), fd, 0);
}
free(k);
}