mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
e41d18a49c
Add helper functions to reduce code duplication in codegen load operations: - gen_load_op1/gen_load_op2: for simple literal load operations following the pattern "if (!val) return; genop_X(...); push();" - gen_load_nil: for conditional nil loading with "if (!val) return;" check - gen_load_lit: for literal loading with push Refactor 8 literal loading functions (codegen_self, codegen_nil, codegen_true, codegen_false, codegen_sym, codegen_float, codegen_back_ref, codegen_nth_ref) and multiple inline nil loading patterns throughout codegen.c. Each refactored function reduced from 5-8 lines to 2-4 lines while maintaining identical bytecode generation behavior. All 1730 tests pass. Co-authored-by: Claude <noreply@anthropic.com>