Add ISEQ_BODY macro

Use ISEQ_BODY macro to get the rb_iseq_constant_body of the ISeq. Using
this macro will make it easier for us to change the allocation strategy
of rb_iseq_constant_body when using Variable Width Allocation.
This commit is contained in:
Peter Zhu 2022-03-23 15:19:48 -04:00
parent 04591e1be7
commit 5f10bd634f
Notes: git 2022-03-24 23:04:20 +09:00
28 changed files with 601 additions and 601 deletions

View file

@ -76,10 +76,10 @@ error !
#define INSN_ENTRY_SIG(insn) \
if (0) { \
ruby_debug_printf("exec: %s@(%"PRIdPTRDIFF", %"PRIdPTRDIFF")@%s:%u\n", #insn, \
(reg_pc - reg_cfp->iseq->body->iseq_encoded), \
(reg_cfp->pc - reg_cfp->iseq->body->iseq_encoded), \
(reg_pc - ISEQ_BODY(reg_cfp->iseq)->iseq_encoded), \
(reg_cfp->pc - ISEQ_BODY(reg_cfp->iseq)->iseq_encoded), \
RSTRING_PTR(rb_iseq_path(reg_cfp->iseq)), \
rb_iseq_line_no(reg_cfp->iseq, reg_pc - reg_cfp->iseq->body->iseq_encoded)); \
rb_iseq_line_no(reg_cfp->iseq, reg_pc - ISEQ_BODY(reg_cfp->iseq)->iseq_encoded)); \
} \
if (USE_INSNS_COUNTER) vm_insns_counter_count_insn(BIN(insn));