List<Instr> codegen(List<Stm> body) { List<Instr> l = null, t = null; for (; body != null; body = body.tail) { munchStm(body.head); if (l == null) l = ilist; else t.tail = ilist; t = last; ilist = last = null; } return l; }
private void emit(Instr inst) { if (last != null) last = last.tail = new List<Instr>(inst, null); else last = ilist = new List<Instr>(inst, null); }