Files
mruby-mruby/include/mruby
Yukihiro "Matz" Matsumoto 0b1af858e2 vm: add OP_RETNIL for returning nil directly
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>
2026-01-27 14:57:26 +09:00
..
2024-06-27 22:46:13 +02:00
2023-05-03 22:12:59 +10:00
2026-01-24 11:31:32 +09:00
2024-09-10 21:07:43 +09:00
2025-11-02 21:18:18 +09:00
2019-08-18 20:12:44 +09:00
2025-06-25 10:46:23 +10:00