summaryrefslogtreecommitdiff
path: root/parse/dump.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-07-15 14:44:40 -0700
committerOri Bernstein <ori@eigenstate.org>2017-07-15 14:44:40 -0700
commit2fd7aa8d72729ccec6c611fb3586e9c4c7b5e067 (patch)
treebff78a7a88c260d0e20a341274fa28f38cf10ed9 /parse/dump.c
parent357f87c1117edfdf77411781ebfae221a406c454 (diff)
downloadmc-2fd7aa8d72729ccec6c611fb3586e9c4c7b5e067.tar.gz
Use type hashing instead of string hasing in tyenv.
Set the stage for stricter env lookups.
Diffstat (limited to 'parse/dump.c')
-rw-r--r--parse/dump.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/parse/dump.c b/parse/dump.c
index f84eea1..9437984 100644
--- a/parse/dump.c
+++ b/parse/dump.c
@@ -111,16 +111,14 @@ outenv(Tyenv *e, FILE *fd, int depth)
Type *t;
char *s;
- if (e->tab) {
- k = htkeys(e->tab, &n);
- for (i = 0; i < n; i++) {
- t = htget(e->tab, k[i]);
- s = tystr(t);
- findentf(fd, depth + 1, "B %s\n", s);
- free(s);
- }
- free(k);
+ k = htkeys(e->tab, &n);
+ for (i = 0; i < n; i++) {
+ t = htget(e->tab, k[i]);
+ s = tystr(t);
+ findentf(fd, depth + 1, "B %s\n", s);
+ free(s);
}
+ free(k);
}
void