diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-07-31 21:06:33 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-07-31 21:11:36 +0900 |
| commit | 43999492a792263eb234db1d399103471c39009c (patch) | |
| tree | 0bd832a03e5b80d0a718d97ee340d38fca189190 /include | |
| parent | 4306893971130edb31ac07d54c86923c2fbfa8c0 (diff) | |
| download | mruby-43999492a792263eb234db1d399103471c39009c.tar.gz mruby-43999492a792263eb234db1d399103471c39009c.zip | |
codegen.c: `mrb_prev_pc()` to take previous instruction position.
It rescans `s->iseq` so that peephole optimizer can take multiple
previous instructions for constant folding, etc.
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/irep.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/mruby/irep.h b/include/mruby/irep.h index aaf489933..2a0e261d1 100644 --- a/include/mruby/irep.h +++ b/include/mruby/irep.h @@ -123,6 +123,7 @@ struct mrb_insn_data { uint16_t a; uint16_t b; uint8_t c; + const mrb_code *addr; }; struct mrb_insn_data mrb_decode_insn(const mrb_code *pc); |
