summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2024-04-17 12:00:03 -0700
committerGitHub <[email protected]>2024-04-17 15:00:03 -0400
commit4cc58ea0b865f2fd20f1e881ddbd4c4fab0b072c (patch)
tree1587d79e55cc448e08ae30f8c4a3175f8195b1cc /vm.c
parentca764062b06f1bb587048bcf374b25a0903ca9e7 (diff)
YJIT: Optimize local variables when EP == BP (#10487)
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/vm.c b/vm.c
index cf2bed84e4..b4f6a4bf16 100644
--- a/vm.c
+++ b/vm.c
@@ -1007,6 +1007,11 @@ vm_make_env_each(const rb_execution_context_t * const ec, rb_control_frame_t *co
}
#endif
+ // Invalidate JIT code that assumes cfp->ep == vm_base_ptr(cfp).
+ if (env->iseq) {
+ rb_yjit_invalidate_ep_is_bp(env->iseq);
+ }
+
return (VALUE)env;
}