codegen.c: avoid constant folding `OP_LOADI16` across branch target.
MODIFY
mrbgems/mruby-compiler/core/codegen.c
mrbgems/mruby-compiler/core/codegen.c
@@ -627,6 +627,7 @@ gen_move(codegen_scope *s, uint16_t dst, uint16_t src, int nopeep)
struct mrb_insn_data data0 = mrb_decode_insn(mrb_prev_pc(s, data.addr));
if (data0.insn != OP_MOVE || data0.a != data.a || data0.b != dst) goto normal;
s->pc = addr_pc(s, data0.addr);
+ if (addr_pc(s, data0.addr) != s->lastlabel) {
/* constant folding */
data0 = mrb_decode_insn(mrb_prev_pc(s, data0.addr));
mrb_int n;
@@ -639,6 +640,7 @@ gen_move(codegen_scope *s, uint16_t dst, uint16_t src, int nopeep)
}
}
}
+ }
genop_2(s, data.insn, dst, data.b);
return;
default:

codegen.c: avoid constant folding `OP_LOADI16` across branch target.