summaryrefslogtreecommitdiff
path: root/mi
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 /mi
parent468265b7b2719d783afc46ea5aa7c9ffa3142970 (diff)
downloadmc-c96b770a0aa93c1e7b99e5874808af85ddacc6a7.tar.gz
Improve error messages.
This involved lots of table changes.
Diffstat (limited to 'mi')
-rw-r--r--mi/cfg.c2
-rw-r--r--mi/match.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/mi/cfg.c b/mi/cfg.c
index 2a24dda..fc1cacf 100644
--- a/mi/cfg.c
+++ b/mi/cfg.c
@@ -211,7 +211,7 @@ Cfg *mkcfg(Node *fn, Node **nl, size_t nn)
case Ndecl:
break;
default:
- die("Invalid node type %s in mkcfg", nodestr(nl[i]->type));
+ die("Invalid node type %s in mkcfg", nodestr[nl[i]->type]);
}
}
post = mkbb(cfg);
diff --git a/mi/match.c b/mi/match.c
index be0e033..f80e40e 100644
--- a/mi/match.c
+++ b/mi/match.c
@@ -224,7 +224,7 @@ static Dtree *addpat(Dtree *t, Node *pat, Node *val, Node ***cap, size_t *ncap)
break;
default:
ret = NULL;
- fatal(pat, "unsupported pattern %s of type %s", opstr(exprop(pat)), tystr(exprtype(pat)));
+ fatal(pat, "unsupported pattern %s of type %s", opstr[exprop(pat)], tystr(exprtype(pat)));
break;
}
return ret;
@@ -332,7 +332,7 @@ char *dtnodestr(Node *n)
case Ovar:
return namestr(n->expr.args[0]);
case Olit:
- return litstr(n->expr.args[0]->lit.littype);
+ return litstr[n->expr.args[0]->lit.littype];
case Oucon:
return namestr(n->expr.args[0]);
case Otup:
@@ -354,7 +354,7 @@ void dtdumpnode(Dtree *dt, FILE *f, int depth, int iswild)
size_t i;
if (dt->patexpr) {
e = dt->patexpr;
- indentf(depth, "%s%s %s : %s\n", iswild ? "WILDCARD " : "", opstr(exprop(e)), dtnodestr(e), tystr(exprtype(e)));
+ indentf(depth, "%s%s %s : %s\n", iswild ? "WILDCARD " : "", opstr[exprop(e)], dtnodestr(e), tystr(exprtype(e)));
}
if (dt->cap)
for (i = 0; i < dt->ncap; i++)