From 7740526b1ccf62a027984e35375bb30ccbc0a000 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Fri, 11 Aug 2023 17:50:53 -0700 Subject: [PATCH] Reorder bp_check and jit_return in cfp It's the actual cfp[6] in the default build, so it's confusing to say otherwise in the comment. --- vm_core.h | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/vm_core.h b/vm_core.h index d9d926d2ad..a2c7edf206 100644 --- a/vm_core.h +++ b/vm_core.h @@ -813,18 +813,16 @@ struct rb_block { }; typedef struct rb_control_frame_struct { - const VALUE *pc; /* cfp[0] */ - VALUE *sp; /* cfp[1] */ - const rb_iseq_t *iseq; /* cfp[2] */ - VALUE self; /* cfp[3] / block[0] */ - const VALUE *ep; /* cfp[4] / block[1] */ - const void *block_code; /* cfp[5] / block[2] */ /* iseq or ifunc or forwarded block handler */ - + const VALUE *pc; // cfp[0] + VALUE *sp; // cfp[1] + const rb_iseq_t *iseq; // cfp[2] + VALUE self; // cfp[3] / block[0] + const VALUE *ep; // cfp[4] / block[1] + const void *block_code; // cfp[5] / block[2] -- iseq, ifunc, or forwarded block handler + void *jit_return; // cfp[6] -- return address for JIT code #if VM_DEBUG_BP_CHECK - VALUE *bp_check; /* cfp[6] */ + VALUE *bp_check; // cfp[7] #endif - // Return address for YJIT code - void *jit_return; } rb_control_frame_t; extern const rb_data_type_t ruby_threadptr_data_type;