From a9bfb64153ae0a07d498d0976d335b65515fd1b1 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 6 Apr 2023 21:13:10 -0700 Subject: [PATCH] Expose rb_sym_to_proc via RJIT This is needed for getblockparamproxy --- common.mk | 1 + rjit_c.c | 1 + rjit_c.rb | 4 ++++ tool/rjit/bindgen.rb | 1 + 4 files changed, 7 insertions(+) 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