From 87b673fc9ad40332856abef0ca1c23b3f193cd22 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 9 Oct 2021 13:31:07 +0900 Subject: codegen.c: peephole optimization `OP_MOVE` after `OP_AREF`. --- mrbgems/mruby-compiler/core/codegen.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mrbgems/mruby-compiler/core/codegen.c b/mrbgems/mruby-compiler/core/codegen.c index 5d23b2dd4..d647b4a55 100644 --- a/mrbgems/mruby-compiler/core/codegen.c +++ b/mrbgems/mruby-compiler/core/codegen.c @@ -619,6 +619,7 @@ gen_move(codegen_scope *s, uint16_t dst, uint16_t src, int nopeep) genop_2SS(s, data.insn, dst, i); } return; + case OP_AREF: case OP_GETUPVAR: if (data.a != src || data.a < s->nlocals) goto normal; rewind_pc(s); -- cgit v1.2.3