ref: 9ea9ad79c78f6cb55ead18303d794dbf77c7ded8
parent: fa9a9dbefc8cf9cdae03303385121481d6e2dfb4
author: Ori Bernstein <[email protected]>
date: Sun Sep 7 18:45:33 EDT 2014
Compute funcrets into their dest. If we're assigning to a value, just pass it to the function we're calling, instead of blitting it.
--- a/6/simp.c
+++ b/6/simp.c
@@ -1499,7 +1499,10 @@
break;
case Ocall:
if (exprtype(n)->type != Tyvoid && stacktype(exprtype(n))) {
- r = temp(s, n);
+ if (dst)
+ r = dst;
+ else
+ r = temp(s, n);
linsert(&n->expr.args, &n->expr.nargs, 1, addr(s, r, exprtype(n)));
for (i = 0; i < n->expr.nargs; i++)
n->expr.args[i] = rval(s, n->expr.args[i], NULL);