Files
mruby-mruby/mrbgems
Yukihiro "Matz" Matsumoto 1a3564f2f1 codegen.c: add new peephole optimization for OP_GETUPVAR.
When `OP_GETUPVAR` is generated right after `OP_SETUPVAR`, there is no
need to read the upvar back to the register, e.g.

    3 008 OP_ADDI       R2      1
    3 011 OP_SETUPVAR   R2      1       0
    4 015 OP_GETUPVAR   R2      1       0
    4 019 OP_LOADI_2    R3

`OP_GETUPVAR` at the address `015` is useless. We can skip it like:

    3 008 OP_ADDI       R2      1
    3 011 OP_SETUPVAR   R2      1      0
    4 015 OP_LOADI_2    R3
2021-07-16 07:52:21 +09:00
..
2021-04-03 19:51:01 +10:00
2021-02-13 17:21:17 +10:00
2021-06-28 23:21:47 +09:00
2020-12-21 21:48:50 +09:00
2020-12-21 21:48:50 +09:00
2020-12-21 21:48:50 +09:00
2020-12-21 21:48:50 +09:00
2020-12-21 21:48:50 +09:00