summaryrefslogtreecommitdiff
path: root/yjit.c
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2022-07-29 01:08:07 +0930
committerGitHub <noreply@github.com>2022-07-28 11:38:07 -0400
commitab08a43ec5ab7a8d82c980dc1eefc9e5d71e926d (patch)
treed4f2090229f0e752f638c97c57997afa0a86d2c4 /yjit.c
parent18b1e5e6dbef9bb0c265e57e1267840d7c13cd88 (diff)
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 <john@hawthorn.email> Co-authored-by: John Hawthorn <john@hawthorn.email>
Notes
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'yjit.c')
-rw-r--r--yjit.c11
1 files changed, 11 insertions, 0 deletions
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)
{