summaryrefslogtreecommitdiff
path: root/lib/mjit/compiler.rb
diff options
context:
space:
mode:
authorJemma Issroff <[email protected]>2022-11-08 14:09:43 -0500
committerPeter Zhu <[email protected]>2022-11-10 10:11:34 -0500
commitc726c48a3dacd9ca1cb0d96fee98890cb74b37d3 (patch)
treef2bbd9f9797ee63e8666fffd18c47e04571b7a6f /lib/mjit/compiler.rb
parent5246f4027ec574e77809845e1b1f7822cc2a5cef (diff)
Remove numiv from RObject
Since object shapes store the capacity of an object, we no longer need the numiv field on RObjects. This gives us one extra slot which we can use to give embedded objects one more instance variable (for a total of 3 ivs). This commit removes the concept of numiv from RObject.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6699
Diffstat (limited to 'lib/mjit/compiler.rb')
-rw-r--r--lib/mjit/compiler.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mjit/compiler.rb b/lib/mjit/compiler.rb
index 575ae6f84c..9e6ea0a119 100644
--- a/lib/mjit/compiler.rb
+++ b/lib/mjit/compiler.rb
@@ -386,7 +386,7 @@ module RubyVM::MJIT
src << " dest_shape_id != ROBJECT_SHAPE_ID(obj)) {\n"
# Conditionally generate a capacity change if there is one
# between the destination and the parent IV set
- src << " rb_ensure_iv_list_size(obj, RBOJECT_NUMIV(obj), #{capa});\n" if capa
+ src << " rb_ensure_iv_list_size(obj, ROBJECT_IV_CAPACITY(obj), #{capa});\n" if capa
src << " ROBJECT_SET_SHAPE_ID(obj, dest_shape_id);\n"
src << " VALUE *ptr = ROBJECT_IVPTR(obj);\n"
src << " RB_OBJ_WRITE(obj, &ptr[index], stack[#{stack_size - 1}]);\n"