reserve a register for a block parameter in a for statement body; ref #2375

This commit is contained in:
Yukihiro "Matz" Matsumoto
2014-06-10 13:15:19 +09:00
parent 58e87996b9
commit c2f6c33fef
+1
View File
@@ -550,6 +550,7 @@ for_body(codegen_scope *s, node *tree)
codegen(s, tree->cdr->car, VAL);
/* generate loop-block */
s = scope_new(s->mrb, s, NULL);
push(); /* push for a block parameter */
lp = loop_push(s, LOOP_FOR);
lp->pc1 = new_label(s);