ref: dffeabb9ccfbe8dc25bebb78f7471578d6cac9c4
parent: 9b44da35f3246fb6c0293a615a9bbb001f13840d
author: Ori Bernstein <[email protected]>
date: Tue Jan 7 19:39:55 EST 2014
Remove a number of redundant 'tf' calls.
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -1071,7 +1071,7 @@
t = unify(st, n, t, type(st, args[i]));
}
n->expr.isconst = isconst;
- settype(st, n, tf(st, t));
+ settype(st, n, t);
break;
case Omod: /* @a % @a -> @a */
case Obor: /* @a | @a -> @a */
@@ -1104,7 +1104,7 @@
t = unify(st, n, t, type(st, args[i]));
}
n->expr.isconst = isconst;
- settype(st, n, tf(st, t));
+ settype(st, n, t);
break;
case Oasn: /* @a = @a -> @a */
infersub(st, n, ret, sawret, &isconst);
@@ -1111,7 +1111,7 @@
t = type(st, args[0]);
for (i = 1; i < nargs; i++)
t = unify(st, n, t, type(st, args[i]));
- settype(st, n, tf(st, t));
+ settype(st, n, t);
if (args[0]->expr.isconst)
fatal(n->line, "Attempting to assign constant \"%s\"", ctxstr(st, args[0]));
break;
@@ -1148,7 +1148,7 @@
t = mktyidxhack(n->line, mktyvar(n->line));
unify(st, n, type(st, args[0]), t);
constrain(st, n, type(st, args[1]), cstrtab[Tcint]);
- settype(st, n, tf(st, t->sub[0]));
+ settype(st, n, t->sub[0]);
break;
case Oslice: /* @a[@b::tcint,@b::tcint] -> @a[,] */
infersub(st, n, ret, sawret, &isconst);
@@ -1156,7 +1156,7 @@
unify(st, n, type(st, args[0]), t);
constrain(st, n, type(st, args[1]), cstrtab[Tcint]);
constrain(st, n, type(st, args[2]), cstrtab[Tcint]);
- settype(st, n, mktyslice(n->line, tf(st, t->sub[0])));
+ settype(st, n, mktyslice(n->line, t->sub[0]));
break;
/* special cases */