ruby-changes:73992
From: Aaron <ko1@a...>
Date: Sat, 15 Oct 2022 09:15:01 +0900 (JST)
Subject: [ruby-changes:73992] 1acc1a5c6d (master): YJIT doesn't need rb_obj_ensure_iv_index_mapping
https://git.ruby-lang.org/ruby.git/commit/?id=1acc1a5c6d From 1acc1a5c6d5d01b2822d7aa4356208095481724b Mon Sep 17 00:00:00 2001 From: Aaron Patterson <tenderlove@r...> Date: Fri, 14 Oct 2022 16:11:37 -0700 Subject: YJIT doesn't need rb_obj_ensure_iv_index_mapping We should make this function static and remove it from YJIT bindings. --- internal/variable.h | 1 - variable.c | 2 +- yjit/bindgen/src/main.rs | 1 - yjit/src/cruby_bindings.inc.rs | 3 --- 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/internal/variable.h b/internal/variable.h index 47037a3392..bb24f5129f 100644 --- a/internal/variable.h +++ b/internal/variable.h @@ -35,7 +35,6 @@ void rb_gvar_ractor_local(const char *name); https://github.com/ruby/ruby/blob/trunk/internal/variable.h#L35 static inline bool ROBJ_TRANSIENT_P(VALUE obj); static inline void ROBJ_TRANSIENT_SET(VALUE obj); static inline void ROBJ_TRANSIENT_UNSET(VALUE obj); -uint32_t rb_obj_ensure_iv_index_mapping(VALUE obj, ID id); struct gen_ivtbl; int rb_gen_ivtbl_get(VALUE obj, ID id, struct gen_ivtbl **ivtbl); diff --git a/variable.c b/variable.c index 1f532f2154..4b8c87bd1f 100644 --- a/variable.c +++ b/variable.c @@ -1449,7 +1449,7 @@ rb_init_iv_list(VALUE obj) https://github.com/ruby/ruby/blob/trunk/variable.c#L1449 // @note May raise when there are too many instance variables. // @note YJIT uses this function at compile time to simplify the work needed to // access the variable at runtime. -uint32_t +static uint32_t rb_obj_ensure_iv_index_mapping(VALUE obj, ID id) { RUBY_ASSERT(RB_TYPE_P(obj, T_OBJECT)); diff --git a/yjit/bindgen/src/main.rs b/yjit/bindgen/src/main.rs index b945e9b106..7bdfdade77 100644 --- a/yjit/bindgen/src/main.rs +++ b/yjit/bindgen/src/main.rs @@ -304,7 +304,6 @@ fn main() { https://github.com/ruby/ruby/blob/trunk/yjit/bindgen/src/main.rs#L304 // From internal/variable.h .allowlist_function("rb_gvar_(get|set)") - .allowlist_function("rb_obj_ensure_iv_index_mapping") // From include/ruby/internal/intern/variable.h .allowlist_function("rb_attr_get") diff --git a/yjit/src/cruby_bindings.inc.rs b/yjit/src/cruby_bindings.inc.rs index db14f9ca02..e12ac9eef1 100644 --- a/yjit/src/cruby_bindings.inc.rs +++ b/yjit/src/cruby_bindings.inc.rs @@ -1015,9 +1015,6 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/yjit/src/cruby_bindings.inc.rs#L1015 extern "C" { pub fn rb_hash_resurrect(hash: VALUE) -> VALUE; } -extern "C" { - pub fn rb_obj_ensure_iv_index_mapping(obj: VALUE, id: ID) -> u32; -} extern "C" { pub fn rb_gvar_get(arg1: ID) -> VALUE; } -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/