Remove consequent `OP_RETURN` by peephole optimization.

parent 5addd5db
...@@ -461,7 +461,7 @@ gen_return(codegen_scope *s, uint8_t op, uint16_t src) ...@@ -461,7 +461,7 @@ gen_return(codegen_scope *s, uint8_t op, uint16_t src)
s->pc = s->lastpc; s->pc = s->lastpc;
genop_1(s, op, data.b); genop_1(s, op, data.b);
} }
else { else if (data.insn != OP_RETURN) {
genop_1(s, op, src); genop_1(s, op, src);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment