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 /tool/mk_builtin_loader.rb | |
parent | 04591e1be7618f64bd3bed8c53c0fcde5fcbddb8 (diff) |
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.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5698
Diffstat (limited to 'tool/mk_builtin_loader.rb')
-rw-r--r-- | tool/mk_builtin_loader.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/mk_builtin_loader.rb b/tool/mk_builtin_loader.rb index 02941735f7..23e6a01017 100644 --- a/tool/mk_builtin_loader.rb +++ b/tool/mk_builtin_loader.rb @@ -321,7 +321,7 @@ def mk_builtin_header file f.puts %' fprintf(f, " const VALUE *argv = &stack[%d];\\n", stack_size - #{argc});' f.puts %' }' f.puts %' else {' - f.puts %' fprintf(f, " const unsigned int lnum = GET_ISEQ()->body->local_table_size;\\n");' + f.puts %' fprintf(f, " const unsigned int lnum = ISEQ_BODY(GET_ISEQ())->local_table_size;\\n");' f.puts %' fprintf(f, " const VALUE *argv = GET_EP() - lnum - VM_ENV_DATA_SIZE + 1 + %ld;\\n", index);' f.puts %' }' end |