@@ -40,9 +40,6 @@ struct rb_cvar_class_tbl_entry {
4040
4141struct rb_classext_struct {
4242 struct st_table * iv_tbl ;
43- #if SIZEOF_SERIAL_T == SIZEOF_VALUE /* otherwise m_tbl is in struct RClass */
44- struct rb_id_table * m_tbl ;
45- #endif
4643 struct rb_id_table * const_tbl ;
4744 struct rb_id_table * callable_m_tbl ;
4845 struct rb_id_table * cc_tbl ; /* ID -> [[ci, cc1], cc2, ...] */
@@ -57,9 +54,6 @@ struct rb_classext_struct {
5754 * included. Hopefully that makes sense.
5855 */
5956 struct rb_subclass_entry * module_subclass_entry ;
60- #if SIZEOF_SERIAL_T != SIZEOF_VALUE && !USE_RVARGC /* otherwise class_serial is in struct RClass */
61- rb_serial_t class_serial ;
62- #endif
6357 const VALUE origin_ ;
6458 const VALUE refined_class ;
6559 rb_alloc_func_t allocator ;
@@ -73,19 +67,10 @@ struct rb_classext_struct {
7367struct RClass {
7468 struct RBasic basic ;
7569 VALUE super ;
70+ struct rb_id_table * m_tbl ;
7671#if !USE_RVARGC
7772 struct rb_classext_struct * ptr ;
7873#endif
79- #if SIZEOF_SERIAL_T == SIZEOF_VALUE
80- /* Class serial is as wide as VALUE. Place it here. */
81- rb_serial_t class_serial ;
82- #else
83- /* Class serial does not fit into struct RClass. Place m_tbl instead. */
84- struct rb_id_table * m_tbl ;
85- # if USE_RVARGC
86- rb_serial_t * class_serial_ptr ;
87- # endif
88- #endif
8974};
9075
9176typedef struct rb_subclass_entry rb_subclass_entry_t ;
@@ -98,25 +83,12 @@ typedef struct rb_classext_struct rb_classext_t;
9883#endif
9984#define RCLASS_IV_TBL (c ) (RCLASS_EXT(c)->iv_tbl)
10085#define RCLASS_CONST_TBL (c ) (RCLASS_EXT(c)->const_tbl)
101- #if SIZEOF_SERIAL_T == SIZEOF_VALUE
102- # define RCLASS_M_TBL (c ) (RCLASS_EXT(c)->m_tbl)
103- #else
104- # define RCLASS_M_TBL (c ) (RCLASS(c)->m_tbl)
105- #endif
86+ #define RCLASS_M_TBL (c ) (RCLASS(c)->m_tbl)
10687#define RCLASS_CALLABLE_M_TBL (c ) (RCLASS_EXT(c)->callable_m_tbl)
10788#define RCLASS_CC_TBL (c ) (RCLASS_EXT(c)->cc_tbl)
10889#define RCLASS_CVC_TBL (c ) (RCLASS_EXT(c)->cvc_tbl)
10990#define RCLASS_ORIGIN (c ) (RCLASS_EXT(c)->origin_)
11091#define RCLASS_REFINED_CLASS (c ) (RCLASS_EXT(c)->refined_class)
111- #if SIZEOF_SERIAL_T == SIZEOF_VALUE
112- # define RCLASS_SERIAL (c ) (RCLASS(c)->class_serial)
113- #else
114- # if USE_RVARGC
115- # define RCLASS_SERIAL (c ) (*RCLASS(c)->class_serial_ptr)
116- # else
117- # define RCLASS_SERIAL (c ) (RCLASS_EXT(c)->class_serial)
118- # endif
119- #endif
12092#define RCLASS_INCLUDER (c ) (RCLASS_EXT(c)->includer)
12193#define RCLASS_SUBCLASS_ENTRY (c ) (RCLASS_EXT(c)->subclass_entry)
12294#define RCLASS_MODULE_SUBCLASS_ENTRY (c ) (RCLASS_EXT(c)->module_subclass_entry)
0 commit comments