From ab08a43ec5ab7a8d82c980dc1eefc9e5d71e926d Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Fri, 29 Jul 2022 01:08:07 +0930 Subject: YJIT: Teach getblockparamproxy to handle the no-block case without exiting (#6191) Teach getblockparamproxy to handle the no-block case without exiting Co-authored-by: John Hawthorn Co-authored-by: John Hawthorn --- yjit.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'yjit.c') diff --git a/yjit.c b/yjit.c index edf5a139cc..1a2f71a959 100644 --- a/yjit.c +++ b/yjit.c @@ -699,6 +699,17 @@ rb_get_cfp_ep(struct rb_control_frame_struct *cfp) return (VALUE*)cfp->ep; } +const VALUE * +rb_get_cfp_ep_level(struct rb_control_frame_struct *cfp, uint32_t lv) +{ + uint32_t i; + const VALUE *ep = (VALUE*)cfp->ep; + for (i = 0; i < lv; i++) { + ep = VM_ENV_PREV_EP(ep); + } + return ep; +} + VALUE rb_yarv_class_of(VALUE obj) { -- cgit v1.2.3