From 6a6e2b48acc1e96fad810c8a43458e3a0f8406e4 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Tue, 17 Mar 2026 10:53:14 +0900 Subject: [PATCH] vm.c: replace mrb_funcall_argv() with goto L_SEND_SYM in OP_MATHILV avoid re-entrant VM call from C; use the same dispatch pattern as OP_MATH and OP_MATHI for consistency. Co-authored-by: Claude --- src/vm.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/vm.c b/src/vm.c index ffefc6799..ee62bab0d 100644 --- a/src/vm.c +++ b/src/vm.c @@ -3252,15 +3252,9 @@ RETRY_TRY_BLOCK: break; \ OP_MATHILV_CASE_FLOAT(op_name); \ default: \ - { \ - mrb_value arg = mrb_int_value(mrb, c); \ - mrb_sym mid = MRB_OPSYM(op_name); \ - mrb_value v = mrb_funcall_argv(mrb, regs[a], mid, 1, &arg); \ - ci = mrb->c->ci; \ - regs[a] = v; \ - mrb_gc_arena_restore(mrb, ai); \ - } \ - break; \ + SET_INT_VALUE(mrb,regs[a+1], c); \ + mid = MRB_OPSYM(op_name); \ + goto L_SEND_SYM; \ } \ NEXT