aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2023-04-06 21:13:10 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2023-04-07 09:49:15 -0700
commita9bfb64153ae0a07d498d0976d335b65515fd1b1 (patch)
tree65f2ba7b4b78de93a1d4e292e68ca018c59103fc
parentac8a16237c727ae2a1446ef6dc810d0e750971fb (diff)
downloadruby-a9bfb64153ae0a07d498d0976d335b65515fd1b1.tar.gz
Expose rb_sym_to_proc via RJIT
This is needed for getblockparamproxy
-rw-r--r--common.mk1
-rw-r--r--rjit_c.c1
-rw-r--r--rjit_c.rb4
-rwxr-xr-xtool/rjit/bindgen.rb1
4 files changed, 7 insertions, 0 deletions
diff --git a/common.mk b/common.mk
index 2fb11c2a6a..98649aa02d 100644
--- a/common.mk
+++ b/common.mk
@@ -13416,6 +13416,7 @@ rjit_c.$(OBJEXT): $(top_srcdir)/internal/gc.h
rjit_c.$(OBJEXT): $(top_srcdir)/internal/hash.h
rjit_c.$(OBJEXT): $(top_srcdir)/internal/imemo.h
rjit_c.$(OBJEXT): $(top_srcdir)/internal/object.h
+rjit_c.$(OBJEXT): $(top_srcdir)/internal/proc.h
rjit_c.$(OBJEXT): $(top_srcdir)/internal/sanitizers.h
rjit_c.$(OBJEXT): $(top_srcdir)/internal/serial.h
rjit_c.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
diff --git a/rjit_c.c b/rjit_c.c
index 7a9912f665..2868fdf3c9 100644
--- a/rjit_c.c
+++ b/rjit_c.c
@@ -19,6 +19,7 @@
#include "internal/hash.h"
#include "internal/sanitizers.h"
#include "internal/gc.h"
+#include "internal/proc.h"
#include "yjit.h"
#include "vm_insnhelper.h"
#include "probes.h"
diff --git a/rjit_c.rb b/rjit_c.rb
index ae79788356..917e0f8772 100644
--- a/rjit_c.rb
+++ b/rjit_c.rb
@@ -696,6 +696,10 @@ module RubyVM::RJIT # :nodoc: all
Primitive.cexpr! %q{ SIZET2NUM((size_t)rb_str_intern) }
end
+ def C.rb_sym_to_proc
+ Primitive.cexpr! %q{ SIZET2NUM((size_t)rb_sym_to_proc) }
+ end
+
def C.rb_vm_bh_to_procval
Primitive.cexpr! %q{ SIZET2NUM((size_t)rb_vm_bh_to_procval) }
end
diff --git a/tool/rjit/bindgen.rb b/tool/rjit/bindgen.rb
index 62f4847709..5c9fcfdf4e 100755
--- a/tool/rjit/bindgen.rb
+++ b/tool/rjit/bindgen.rb
@@ -572,6 +572,7 @@ generator = BindingGenerator.new(
rjit_build_kwhash
rb_rjit_entry_stub_hit
rb_rjit_branch_stub_hit
+ rb_sym_to_proc
],
types: %w[
CALL_DATA