mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
0b1af858e2
Add a new opcode that returns nil without requiring LOADNIL + RETURN. This avoids loading nil into a register by setting the return value (v) directly. The implementation uses a separate label (L_RETURN_NIL) to bypass v = regs[a], preserving self in regs[0] for ensure blocks. Codegen applies peephole optimization to fuse LOADNIL + RETURN -> RETNIL. Co-authored-by: Claude <noreply@anthropic.com>