Skip to content

Commit 1acc1a5

Browse files
committed
YJIT doesn't need rb_obj_ensure_iv_index_mapping
We should make this function static and remove it from YJIT bindings.
1 parent 53e0e5e commit 1acc1a5

File tree

4 files changed

+1
-6
lines changed

4 files changed

+1
-6
lines changed

internal/variable.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ void rb_gvar_ractor_local(const char *name);
3535
static inline bool ROBJ_TRANSIENT_P(VALUE obj);
3636
static inline void ROBJ_TRANSIENT_SET(VALUE obj);
3737
static inline void ROBJ_TRANSIENT_UNSET(VALUE obj);
38-
uint32_t rb_obj_ensure_iv_index_mapping(VALUE obj, ID id);
3938

4039
struct gen_ivtbl;
4140
int rb_gen_ivtbl_get(VALUE obj, ID id, struct gen_ivtbl **ivtbl);

variable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1449,7 +1449,7 @@ rb_init_iv_list(VALUE obj)
14491449
// @note May raise when there are too many instance variables.
14501450
// @note YJIT uses this function at compile time to simplify the work needed to
14511451
// access the variable at runtime.
1452-
uint32_t
1452+
static uint32_t
14531453
rb_obj_ensure_iv_index_mapping(VALUE obj, ID id)
14541454
{
14551455
RUBY_ASSERT(RB_TYPE_P(obj, T_OBJECT));

yjit/bindgen/src/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,6 @@ fn main() {
304304

305305
// From internal/variable.h
306306
.allowlist_function("rb_gvar_(get|set)")
307-
.allowlist_function("rb_obj_ensure_iv_index_mapping")
308307

309308
// From include/ruby/internal/intern/variable.h
310309
.allowlist_function("rb_attr_get")

yjit/src/cruby_bindings.inc.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,9 +1015,6 @@ extern "C" {
10151015
extern "C" {
10161016
pub fn rb_hash_resurrect(hash: VALUE) -> VALUE;
10171017
}
1018-
extern "C" {
1019-
pub fn rb_obj_ensure_iv_index_mapping(obj: VALUE, id: ID) -> u32;
1020-
}
10211018
extern "C" {
10221019
pub fn rb_gvar_get(arg1: ID) -> VALUE;
10231020
}

0 commit comments

Comments
 (0)