Remove dead iv_index_tbl field in RObject

This commit is contained in:
Peter Zhu 2025-02-12 13:22:18 -05:00
parent f32d5071b7
commit 16f41eca53
Notes: git 2025-02-12 19:03:28 +00:00
4 changed files with 0 additions and 13 deletions

View File

@ -95,16 +95,6 @@ struct RObject {
struct { struct {
/** Pointer to a C array that holds instance variables. */ /** Pointer to a C array that holds instance variables. */
VALUE *ivptr; VALUE *ivptr;
/**
* This is a table that holds instance variable name to index
* mapping. Used when accessing instance variables using names.
*
* @internal
*
* This is a shortcut for `RCLASS_IV_INDEX_TBL(rb_obj_class(obj))`.
*/
struct rb_id_table *iv_index_tbl;
} heap; } heap;
/* Embedded instance variables. When an object is small enough, it /* Embedded instance variables. When an object is small enough, it

View File

@ -806,7 +806,6 @@ module RubyVM::RJIT # :nodoc: all
heap: CType::Struct.new( heap: CType::Struct.new(
"", Primitive.cexpr!("SIZEOF(((struct RObject *)NULL)->as.heap)"), "", Primitive.cexpr!("SIZEOF(((struct RObject *)NULL)->as.heap)"),
ivptr: [CType::Pointer.new { self.VALUE }, Primitive.cexpr!("OFFSETOF(((struct RObject *)NULL)->as.heap, ivptr)")], ivptr: [CType::Pointer.new { self.VALUE }, Primitive.cexpr!("OFFSETOF(((struct RObject *)NULL)->as.heap, ivptr)")],
iv_index_tbl: [CType::Pointer.new { self.rb_id_table }, Primitive.cexpr!("OFFSETOF(((struct RObject *)NULL)->as.heap, iv_index_tbl)")],
), ),
ary: CType::Array.new { self.VALUE }, ary: CType::Array.new { self.VALUE },
), Primitive.cexpr!("OFFSETOF((*((struct RObject *)NULL)), as)")], ), Primitive.cexpr!("OFFSETOF((*((struct RObject *)NULL)), as)")],

1
yjit.c
View File

@ -42,7 +42,6 @@
// Field offsets for the RObject struct // Field offsets for the RObject struct
enum robject_offsets { enum robject_offsets {
ROBJECT_OFFSET_AS_HEAP_IVPTR = offsetof(struct RObject, as.heap.ivptr), ROBJECT_OFFSET_AS_HEAP_IVPTR = offsetof(struct RObject, as.heap.ivptr),
ROBJECT_OFFSET_AS_HEAP_IV_INDEX_TBL = offsetof(struct RObject, as.heap.iv_index_tbl),
ROBJECT_OFFSET_AS_ARY = offsetof(struct RObject, as.ary), ROBJECT_OFFSET_AS_ARY = offsetof(struct RObject, as.ary),
}; };

View File

@ -972,7 +972,6 @@ pub const DEFINED_FUNC: defined_type = 16;
pub const DEFINED_CONST_FROM: defined_type = 17; pub const DEFINED_CONST_FROM: defined_type = 17;
pub type defined_type = u32; pub type defined_type = u32;
pub const ROBJECT_OFFSET_AS_HEAP_IVPTR: robject_offsets = 16; pub const ROBJECT_OFFSET_AS_HEAP_IVPTR: robject_offsets = 16;
pub const ROBJECT_OFFSET_AS_HEAP_IV_INDEX_TBL: robject_offsets = 24;
pub const ROBJECT_OFFSET_AS_ARY: robject_offsets = 16; pub const ROBJECT_OFFSET_AS_ARY: robject_offsets = 16;
pub type robject_offsets = u32; pub type robject_offsets = u32;
pub const RUBY_OFFSET_RSTRING_LEN: rstring_offsets = 16; pub const RUBY_OFFSET_RSTRING_LEN: rstring_offsets = 16;