summaryrefslogtreecommitdiff
path: root/include/ruby/internal/encoding
diff options
context:
space:
mode:
authorEileen M. Uchitelle <[email protected]>2025-03-17 10:42:48 -0400
committerGitHub <[email protected]>2025-03-17 10:42:48 -0400
commitc85dffeee2f1899e0db3bde6a4fb49bc90c90ec2 (patch)
tree5545ed4f48598c820c70b4bf709bb45273367b7c /include/ruby/internal/encoding
parent8d6f153fba8ce48a8e31cb22a9c9222bbb1832f6 (diff)
Avoid pinning `storage_head` in `iseq_mark_and_move` (#12880)
* Avoid pinning `storage_head` in `iseq_mark_and_move` This refactor changes the behavior of `iseq_mark_and_move` to avoid pinning the `storage_head`. Previously pinning was required because they could be gc'd during `iseq_set_sequence` it would be possible to end up with a half build array of instructions. However, in order to implement a moving immix algorithm we can't pin these objects so this rafactoring changes the code to mark and move. To accomplish this, it was required to add `iseq_size`, `iseq_encoded`, and the `mark_bits` union to the `iseq_compile_data` struct. In addition `iseq_compile_data` sets a bool for whether there is a single or list of mark bits. While this change is needed for moving immix, it should be better for Ruby's GC as well. * Don't allocate mark_offset_bits for one word If only one word is needed, we don't need to allocate mark_offset_bits and can instead directly write to it. --------- Co-authored-by: Peter Zhu <[email protected]>
Notes
Notes: Merged-By: eileencodes <[email protected]>
Diffstat (limited to 'include/ruby/internal/encoding')
0 files changed, 0 insertions, 0 deletions