summaryrefslogtreecommitdiff
path: root/mjit_c.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2022-11-29 00:12:29 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2022-11-29 00:12:33 -0800
commit8a0acbea4cf7be4bfaf329d077b2b4c9a2ad425b (patch)
tree76558f7cf4269219bc29b9d020c90cfa0c637e9a /mjit_c.rb
parent44165df121f13ef7b148b8ba4aa08386a24c4df5 (diff)
MJIT: Refactor CDHASH handling
Converting a CDHASH into a safe Hash is a lot of work, but retrieving just values is much easier.
Diffstat (limited to 'mjit_c.rb')
-rw-r--r--mjit_c.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/mjit_c.rb b/mjit_c.rb
index eb82c9fd40..f3a77e26fd 100644
--- a/mjit_c.rb
+++ b/mjit_c.rb
@@ -5,8 +5,8 @@ module RubyVM::MJIT
# This `class << C` section is for calling C functions. For importing variables
# or macros as is, please consider using tool/mjit/bindgen.rb instead.
class << C
- def cdhash_to_hash(cdhash_addr)
- Primitive.cdhash_to_hash(cdhash_addr)
+ def rb_hash_values(cdhash_addr)
+ Primitive.cexpr! 'rb_hash_values((VALUE)NUM2PTR(cdhash_addr))'
end
def builtin_compiler(f, bf, index, stack_size, builtin_inline_p)