Skip to content

Commit 7740526

Browse files
committed
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.
1 parent 0e16245 commit 7740526

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

vm_core.h

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -813,18 +813,16 @@ struct rb_block {
813813
};
814814

815815
typedef struct rb_control_frame_struct {
816-
const VALUE *pc; /* cfp[0] */
817-
VALUE *sp; /* cfp[1] */
818-
const rb_iseq_t *iseq; /* cfp[2] */
819-
VALUE self; /* cfp[3] / block[0] */
820-
const VALUE *ep; /* cfp[4] / block[1] */
821-
const void *block_code; /* cfp[5] / block[2] */ /* iseq or ifunc or forwarded block handler */
822-
816+
const VALUE *pc; // cfp[0]
817+
VALUE *sp; // cfp[1]
818+
const rb_iseq_t *iseq; // cfp[2]
819+
VALUE self; // cfp[3] / block[0]
820+
const VALUE *ep; // cfp[4] / block[1]
821+
const void *block_code; // cfp[5] / block[2] -- iseq, ifunc, or forwarded block handler
822+
void *jit_return; // cfp[6] -- return address for JIT code
823823
#if VM_DEBUG_BP_CHECK
824-
VALUE *bp_check; /* cfp[6] */
824+
VALUE *bp_check; // cfp[7]
825825
#endif
826-
// Return address for YJIT code
827-
void *jit_return;
828826
} rb_control_frame_t;
829827

830828
extern const rb_data_type_t ruby_threadptr_data_type;

0 commit comments

Comments
 (0)