mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Add a new instruction OP_LOADI16.
Which loads 16bit integer to the register. The instruction number should be reorder on massive instruction refactoring. The instruction is added for `mruby/c` which had performance issue with `OP_EXT`. With this instruction, `mruby/c` VM can just raise errors on `OP_EXT` extension instructions.
This commit is contained in:
@@ -130,6 +130,10 @@ codedump(mrb_state *mrb, mrb_irep *irep)
|
||||
printf("OP_LOADI\tR%d\t-%d\t", a, b);
|
||||
print_lv_a(mrb, irep, a);
|
||||
break;
|
||||
CASE(OP_LOADI16, BS):
|
||||
printf("OP_LOADI16\tR%d\t%d\t", a, (int)(int16_t)b);
|
||||
print_lv_a(mrb, irep, a);
|
||||
break;
|
||||
CASE(OP_LOADI__1, B):
|
||||
printf("OP_LOADI__1\tR%d\t\t", a);
|
||||
print_lv_a(mrb, irep, a);
|
||||
|
||||
Reference in New Issue
Block a user