From ae7890df33577b9f4eecab5626644d619ba442dd Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 13 Mar 2025 14:37:29 -0700 Subject: [PATCH] Use the EC parameter in instructions. The forwarding instructions should use the `ec` parameter passed to vm_exec_core instead of trying to look up the EC via `GET_EC()`. It's cheaper to get the local than to try looking up a global --- insns.def | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/insns.def b/insns.def index ed6becc88a..eb28631ffb 100644 --- a/insns.def +++ b/insns.def @@ -869,7 +869,7 @@ sendforward struct rb_forwarding_call_data adjusted_cd; struct rb_callinfo adjusted_ci; - VALUE bh = vm_caller_setup_fwd_args(GET_EC(), GET_CFP(), cd, blockiseq, 0, &adjusted_cd, &adjusted_ci); + VALUE bh = vm_caller_setup_fwd_args(ec, GET_CFP(), cd, blockiseq, 0, &adjusted_cd, &adjusted_ci); val = vm_sendish(ec, GET_CFP(), &adjusted_cd.cd, bh, mexp_search_method); JIT_EXEC(ec, val); @@ -1081,7 +1081,7 @@ invokesuperforward struct rb_forwarding_call_data adjusted_cd; struct rb_callinfo adjusted_ci; - VALUE bh = vm_caller_setup_fwd_args(GET_EC(), GET_CFP(), cd, blockiseq, 1, &adjusted_cd, &adjusted_ci); + VALUE bh = vm_caller_setup_fwd_args(ec, GET_CFP(), cd, blockiseq, 1, &adjusted_cd, &adjusted_ci); val = vm_sendish(ec, GET_CFP(), &adjusted_cd.cd, bh, mexp_search_super); JIT_EXEC(ec, val);