summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-compiler/core/codegen.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-10-09 13:31:07 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-10-09 13:31:07 +0900
commit87b673fc9ad40332856abef0ca1c23b3f193cd22 (patch)
tree134e8c1ffc4616b6a5e853813c16b99eafe1a325 /mrbgems/mruby-compiler/core/codegen.c
parentbec074e6a31fd7a577e2c0e726167da8dc44c4c6 (diff)
downloadmruby-87b673fc9ad40332856abef0ca1c23b3f193cd22.tar.gz
mruby-87b673fc9ad40332856abef0ca1c23b3f193cd22.zip
codegen.c: peephole optimization `OP_MOVE` after `OP_AREF`.
Diffstat (limited to 'mrbgems/mruby-compiler/core/codegen.c')
-rw-r--r--mrbgems/mruby-compiler/core/codegen.c1
1 files changed, 1 insertions, 0 deletions
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);