mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
skip useless OP_MOVE in peephole optimization
This commit is contained in:
@@ -170,6 +170,10 @@ genop_peep(codegen_scope *s, mrb_code i, int val)
|
||||
|
||||
switch (c1) {
|
||||
case OP_MOVE:
|
||||
if (GETARG_A(i) == GETARG_B(i)) {
|
||||
/* skip useless OP_MOVE */
|
||||
return;
|
||||
}
|
||||
if (val) break;
|
||||
switch (c0) {
|
||||
case OP_MOVE:
|
||||
|
||||
Reference in New Issue
Block a user