ref: d27288db4ad5b2154c8c946029f8ed1943012286
parent: 8317e87e7b6f9a15ff41f9f7293ef46dc208d0d7
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Aug 26 17:15:56 EDT 2017
Let's get happy little rvalues.
--- a/mi/flatten.c
+++ b/mi/flatten.c
@@ -887,7 +887,7 @@
Loop l;
Node *lbody, *lclean, *lstep, *lmatch, *lend;
Node *done, *val, *iter, *valptr, *iterptr;
- Node *func, *call;
+ Node *func, *call, *seq;
Trait *tr;
val = temp(s, n->iterstmt.elt);
@@ -911,7 +911,8 @@
s->loop.lbrk = lend;
s->loop.body = n->iterstmt.body->block.scope;
- append(s, asn(iter, n->iterstmt.seq));
+ seq = rval(s, n->iterstmt.seq);
+ append(s, asn(iter, seq));
jmp(s, lstep);
flatten(s, lbody);
/* body */