mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
codegen.c: assign post assignees for fixed number of RHS.
This commit is contained in:
@@ -2745,8 +2745,14 @@ codegen(codegen_scope *s, node *tree, int val)
|
||||
}
|
||||
if (t->cdr && t->cdr->car) {
|
||||
t = t->cdr->car;
|
||||
while (n<len) {
|
||||
gen_assignment(s, t->car, NULL, rhs+n, NOVAL);
|
||||
while (t) {
|
||||
if (n<len) {
|
||||
gen_assignment(s, t->car, NULL, rhs+n, NOVAL);
|
||||
}
|
||||
else {
|
||||
genop_1(s, OP_LOADNIL, cursp());
|
||||
gen_assignment(s, t->car, NULL, cursp(), NOVAL);
|
||||
}
|
||||
t = t->cdr;
|
||||
n++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user