summaryrefslogtreecommitdiff
path: root/6
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-01-06 13:29:51 -0800
committerOri Bernstein <ori@eigenstate.org>2015-01-06 13:29:51 -0800
commitc96b770a0aa93c1e7b99e5874808af85ddacc6a7 (patch)
treed60d4652014bc44186663f7afaea3338281124ae /6
parent468265b7b2719d783afc46ea5aa7c9ffa3142970 (diff)
downloadmc-c96b770a0aa93c1e7b99e5874808af85ddacc6a7.tar.gz
Improve error messages.
This involved lots of table changes.
Diffstat (limited to '6')
-rw-r--r--6/gengas.c2
-rw-r--r--6/genp9.c2
-rw-r--r--6/isel.c8
-rw-r--r--6/simp.c4
4 files changed, 8 insertions, 8 deletions
diff --git a/6/gengas.c b/6/gengas.c
index 7b40856..9095314 100644
--- a/6/gengas.c
+++ b/6/gengas.c
@@ -514,7 +514,7 @@ void gengas(Node *file, char *out)
simpglobl(n, globls, &fn, &nfn, &blob, &nblob);
break;
default:
- die("Bad node %s in toplevel", nodestr(n->type));
+ die("Bad node %s in toplevel", nodestr[n->type]);
break;
}
}
diff --git a/6/genp9.c b/6/genp9.c
index 7a591b9..3c21cfb 100644
--- a/6/genp9.c
+++ b/6/genp9.c
@@ -533,7 +533,7 @@ void genp9(Node *file, char *out)
simpglobl(n, globls, &fn, &nfn, &blob, &nblob);
break;
default:
- die("Bad node %s in toplevel", nodestr(n->type));
+ die("Bad node %s in toplevel", nodestr[n->type]);
break;
}
}
diff --git a/6/isel.c b/6/isel.c
index 01bc81d..f2da224 100644
--- a/6/isel.c
+++ b/6/isel.c
@@ -102,11 +102,11 @@ static Loc *loc(Isel *s, Node *n)
case Lbool: l = loclit(v->lit.boolval, mode(n)); break;
case Lint: l = loclit(v->lit.intval, mode(n)); break;
default:
- die("Literal type %s should be blob", litstr(v->lit.littype));
+ die("Literal type %s should be blob", litstr[v->lit.littype]);
}
break;
default:
- die("Node %s not leaf in loc()", opstr(exprop(n)));
+ die("Node %s not leaf in loc()", opstr[exprop(n)]);
break;
}
return l;
@@ -648,7 +648,7 @@ Loc *selexpr(Isel *s, Node *n)
return r;
case Oasn: /* relabel */
- die("Unimplemented op %s", opstr(exprop(n)));
+ die("Unimplemented op %s", opstr[exprop(n)]);
break;
case Oset:
assert(exprop(args[0]) == Ovar || exprop(args[0]) == Oderef);
@@ -756,7 +756,7 @@ Loc *selexpr(Isel *s, Node *n)
case Obreak: case Ocontinue:
case Numops:
dump(n, stdout);
- die("Should not see %s in isel", opstr(exprop(n)));
+ die("Should not see %s in isel", opstr[exprop(n)]);
break;
}
return r;
diff --git a/6/simp.c b/6/simp.c
index 7e62fec..b25f45b 100644
--- a/6/simp.c
+++ b/6/simp.c
@@ -277,7 +277,7 @@ static void append(Simp *s, Node *n)
static int ispure(Node *n)
{
- return ispureop[exprop(n)];
+ return opispure[exprop(n)];
}
static int isconstfn(Node *s)
@@ -822,7 +822,7 @@ static Node *lval(Simp *s, Node *n)
case Oderef: r = deref(rval(s, args[0], NULL), NULL); break;
case Omemb: r = deref(membaddr(s, n), NULL); break;
default:
- fatal(n, "%s cannot be an lvalue", opstr(exprop(n)));
+ fatal(n, "%s cannot be an lvalue", opstr[exprop(n)]);
break;
}
return r;