From 7ce6bcaf8b1f06ff27920f287f534b9c19d9ccc3 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 21 Jun 2023 16:02:08 -0700 Subject: [PATCH] Expose rb_hash_resurrect This is for implementing the `duphash` instruction --- rjit_c.rb | 4 ++++ tool/rjit/bindgen.rb | 1 + 2 files changed, 5 insertions(+) diff --git a/rjit_c.rb b/rjit_c.rb index 000fc0a5cc..735a097d69 100644 --- a/rjit_c.rb +++ b/rjit_c.rb @@ -616,6 +616,10 @@ module RubyVM::RJIT # :nodoc: all Primitive.cexpr! %q{ SIZET2NUM((size_t)rb_hash_new_with_size) } end + def C.rb_hash_resurrect + Primitive.cexpr! %q{ SIZET2NUM((size_t)rb_hash_resurrect) } + end + def C.rb_ivar_defined Primitive.cexpr! %q{ SIZET2NUM((size_t)rb_ivar_defined) } end diff --git a/tool/rjit/bindgen.rb b/tool/rjit/bindgen.rb index 1dd3b78bd5..f54d2203ac 100755 --- a/tool/rjit/bindgen.rb +++ b/tool/rjit/bindgen.rb @@ -526,6 +526,7 @@ generator = BindingGenerator.new( rb_hash_bulk_insert rb_hash_new rb_hash_new_with_size + rb_hash_resurrect rb_ivar_get rb_obj_as_string_result rb_obj_is_kind_of