summaryrefslogtreecommitdiff
path: root/parse/stab.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@markovcorp.com>2019-02-26 14:07:58 -0800
committerOri Bernstein <ori@markovcorp.com>2019-02-26 14:07:58 -0800
commitd87c0959d85b40fcf60b9c6dd0a2f2111f888b55 (patch)
tree3d9ee97668eda3d4e2656ac069f8575250edc7e2 /parse/stab.c
parent02201160614e5f25a7a73d86ed26a1f90fa4f5bb (diff)
downloadmc-d87c0959d85b40fcf60b9c6dd0a2f2111f888b55.tar.gz
Accept that `file` isn't a node.
Shrink node sizes, simplify code a bit.
Diffstat (limited to 'parse/stab.c')
-rw-r--r--parse/stab.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/parse/stab.c b/parse/stab.c
index 3efcd03..cc7a644 100644
--- a/parse/stab.c
+++ b/parse/stab.c
@@ -339,7 +339,7 @@ gettrait(Stab *st, Node *n)
Stab *
getns(char *name) {
- return htget(file->file.ns, name);
+ return htget(file.ns, name);
}
static int
@@ -588,7 +588,7 @@ putimpl(Stab *st, Node *n)
fname(n->loc), lnum(n->loc));
/* if this is not a duplicate, record it for later export */
if (!impl)
- lappend(&file->file.impl, &file->file.nimpl, n);
+ lappend(&file.impl, &file.nimpl, n);
/*
The impl is not defined in this file, so setting the
trait name would be a bug here.
@@ -618,7 +618,7 @@ putns(Stab *scope)
s = getns(scope->name);
if (s)
lfatal(Zloc, "Namespace %s already defined", scope->name);
- htput(file->file.ns, scope->name, scope);
+ htput(file.ns, scope->name, scope);
}
/*
@@ -636,7 +636,7 @@ updatens(Stab *st, char *name)
if (st->name)
die("stab %s already has namespace; Can't set to %s", st->name, name);
st->name = strdup(name);
- htput(file->file.ns, st->name, st);
+ htput(file.ns, st->name, st);
k = htkeys(st->dcl, &nk);
for (i = 0; i < nk; i++)