From 5f10bd634fb6ae8f74a4ea730176233b0ca96954 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Wed, 23 Mar 2022 15:19:48 -0400 Subject: 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. --- vm_exec.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'vm_exec.h') diff --git a/vm_exec.h b/vm_exec.h index 89c925cbb4..edea61d4f8 100644 --- a/vm_exec.h +++ b/vm_exec.h @@ -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)); -- cgit v1.2.3