codegen.c: use `OP_ARRAY` instead of `OP_ARRAY2` if possible.
`OP_ARRAY` inline elements, i.e: with `OP_ARRAY Rn Rm len`, `Rn` and
`Rm` should always be the same register.
MODIFY
mrbgems/mruby-compiler/core/codegen.c
mrbgems/mruby-compiler/core/codegen.c
@@ -2739,7 +2739,12 @@ codegen(codegen_scope *s, node *tree, int val)
else {
rn = len - post - n;
}
+ if (cursp() == rhs+n) {
+ genop_2(s, OP_ARRAY, cursp(), rn);
+ }
+ else {
genop_3(s, OP_ARRAY2, cursp(), rhs+n, rn);
+ }
gen_assignment(s, t->car, NULL, cursp(), NOVAL);
n += rn;
}

codegen.c: use `OP_ARRAY` instead of `OP_ARRAY2` if possible.

`OP_ARRAY` inline elements, i.e: with `OP_ARRAY Rn Rm len`, `Rn` and
`Rm` should always be the same register.