diff options
author | Jean Boussier <byroot@ruby-lang.org> | 2023-10-10 13:12:17 +0200 |
---|---|---|
committer | Jean Boussier <jean.boussier@gmail.com> | 2023-10-10 14:47:54 +0200 |
commit | 5cc44f48c51974a84a40480477a4afd8901ae7e4 (patch) | |
tree | 9c252adf59e2e0b932a74a7d0cf000969039e97d /rjit_c.rb | |
parent | fd21460898d2d5044c1bcc140927142921424791 (diff) | |
download | ruby-5cc44f48c51974a84a40480477a4afd8901ae7e4.tar.gz |
Refactor rb_shape_transition_shape_capa to not accept capacity
This way the groth factor is encapsulated, which allows
rb_shape_transition_shape_capa to be smarter about ideal sizes.
Diffstat (limited to 'rjit_c.rb')
-rw-r--r-- | rjit_c.rb | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -171,9 +171,9 @@ module RubyVM::RJIT # :nodoc: all me_addr == 0 ? nil : rb_method_entry_t.new(me_addr) end - def rb_shape_transition_shape_capa(shape, new_capacity) + def rb_shape_transition_shape_capa(shape) _shape = shape.to_i - shape_addr = Primitive.cexpr! 'SIZET2NUM((size_t)rb_shape_transition_shape_capa((rb_shape_t *)NUM2SIZET(_shape), NUM2UINT(new_capacity)))' + shape_addr = Primitive.cexpr! 'SIZET2NUM((size_t)rb_shape_transition_shape_capa((rb_shape_t *)NUM2SIZET(_shape)))' rb_shape_t.new(shape_addr) end |