diff options
author | Peter Zhu <peter@peterzhu.ca> | 2022-03-23 15:19:48 -0400 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2022-03-24 10:03:51 -0400 |
commit | 5f10bd634fb6ae8f74a4ea730176233b0ca96954 (patch) | |
tree | 170c1c81ea63184290c9e021cc45bffbfc3f4f41 /vm_exec.h | |
parent | 04591e1be7618f64bd3bed8c53c0fcde5fcbddb8 (diff) | |
download | ruby-5f10bd634fb6ae8f74a4ea730176233b0ca96954.tar.gz |
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.
Diffstat (limited to 'vm_exec.h')
-rw-r--r-- | vm_exec.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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)); |