summaryrefslogtreecommitdiff
path: root/tool/ruby_vm
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2022-03-23 15:19:48 -0400
committerPeter Zhu <peter@peterzhu.ca>2022-03-24 10:03:51 -0400
commit5f10bd634fb6ae8f74a4ea730176233b0ca96954 (patch)
tree170c1c81ea63184290c9e021cc45bffbfc3f4f41 /tool/ruby_vm
parent04591e1be7618f64bd3bed8c53c0fcde5fcbddb8 (diff)
downloadruby-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 'tool/ruby_vm')
-rw-r--r--tool/ruby_vm/views/_mjit_compile_send.erb6
1 files changed, 3 insertions, 3 deletions
diff --git a/tool/ruby_vm/views/_mjit_compile_send.erb b/tool/ruby_vm/views/_mjit_compile_send.erb
index 28e316a1ef..8900ee6425 100644
--- a/tool/ruby_vm/views/_mjit_compile_send.erb
+++ b/tool/ruby_vm/views/_mjit_compile_send.erb
@@ -54,7 +54,7 @@
<%= render 'mjit_compile_pc_and_sp', locals: { insn: insn } -%>
% # JIT: If ISeq is inlinable, call the inlined method without pushing a frame.
- if (iseq && status->inlined_iseqs != NULL && iseq->body == status->inlined_iseqs[pos]) {
+ if (iseq && status->inlined_iseqs != NULL && ISEQ_BODY(iseq) == status->inlined_iseqs[pos]) {
fprintf(f, " {\n");
fprintf(f, " VALUE orig_self = reg_cfp->self;\n");
fprintf(f, " reg_cfp->self = stack[%d];\n", b->stack_size + sp_inc - 1);
@@ -84,8 +84,8 @@
}
else { // VM_METHOD_TYPE_ISEQ
% # fastpath_applied_iseq_p checks rb_simple_iseq_p, which ensures has_opt == FALSE
- fprintf(f, " vm_call_iseq_setup_normal(ec, reg_cfp, &calling, cc_cme, 0, %d, %d);\n", iseq->body->param.size, iseq->body->local_table_size);
- if (iseq->body->catch_except_p) {
+ fprintf(f, " vm_call_iseq_setup_normal(ec, reg_cfp, &calling, cc_cme, 0, %d, %d);\n", ISEQ_BODY(iseq)->param.size, ISEQ_BODY(iseq)->local_table_size);
+ if (ISEQ_BODY(iseq)->catch_except_p) {
fprintf(f, " VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_FINISH);\n");
fprintf(f, " val = vm_exec(ec, true);\n");
}