summaryrefslogtreecommitdiff
path: root/parse/infer.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-01-20 23:06:03 -0800
committerOri Bernstein <ori@eigenstate.org>2016-01-20 23:06:03 -0800
commit6361a241f462769284053e07d51cd0638d3e94af (patch)
tree9c69b768bdccb941da1384e53745f87e4c94afa5 /parse/infer.c
parent631e14604ba34ad97514cf302de75c3c3102d316 (diff)
downloadmc-6361a241f462769284053e07d51cd0638d3e94af.tar.gz
Add a distinction between label values and names.
This allows us to have labels work across scopes in assembly source.
Diffstat (limited to 'parse/infer.c')
-rw-r--r--parse/infer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse/infer.c b/parse/infer.c
index 4cbeab1..54499ee 100644
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -1530,7 +1530,7 @@ static void inferexpr(Inferstate *st, Node **np, Type *ret, int *sawret)
break;
case Ojmp: /* goto void* -> void */
if (args[0]->type == Nlit && args[0]->lit.littype == Llbl)
- args[0] = getlbl(curstab(), args[0]->loc, args[0]->lit.lblval);
+ args[0] = getlbl(curstab(), args[0]->loc, args[0]->lit.lblname);
infersub(st, n, ret, sawret, &isconst);
settype(st, n, mktype(Zloc, Tyvoid));
break;
@@ -1864,7 +1864,7 @@ static void infernode(Inferstate *st, Node **np, Type *ret, int *sawret)
break;
case Nlit:
if (n->lit.littype == Llbl)
- putlbl(curstab(), n->lit.lblval, n);
+ putlbl(curstab(), n->lit.lblname, n);
break;
case Nname:
case Nuse: