From a267dfd76bc87e3bb625700e33d6b1c7c0659bea Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Thu, 8 Aug 2024 06:11:52 +0900 Subject: [PATCH] vm.c (OP_CLASS,OP_MODULE): combine declarations with initializers --- src/vm.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/vm.c b/src/vm.c index 1508b5b8a..d06884210 100644 --- a/src/vm.c +++ b/src/vm.c @@ -2918,11 +2918,10 @@ RETRY_TRY_BLOCK: CASE(OP_CLASS, BB) { struct RClass *c = 0, *baseclass; - mrb_value base, super; mrb_sym id = irep->syms[b]; + mrb_value base = regs[a]; + mrb_value super = regs[a+1]; - base = regs[a]; - super = regs[a+1]; if (mrb_nil_p(base)) { baseclass = MRB_PROC_TARGET_CLASS(ci->proc); if (!baseclass) baseclass = mrb->object_class; @@ -2937,10 +2936,9 @@ RETRY_TRY_BLOCK: CASE(OP_MODULE, BB) { struct RClass *cls = 0, *baseclass; - mrb_value base; mrb_sym id = irep->syms[b]; + mrb_value base = regs[a]; - base = regs[a]; if (mrb_nil_p(base)) { baseclass = MRB_PROC_TARGET_CLASS(ci->proc); if (!baseclass) baseclass = mrb->object_class;