summaryrefslogtreecommitdiff
path: root/internal/class.h
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2022-10-31 14:05:37 -0700
committerGitHub <noreply@github.com>2022-10-31 14:05:37 -0700
commit02f15542245222ee392e68fb244b3b8c4a12ad82 (patch)
treeebf3180364aaba5893a17b932605911072189e3d /internal/class.h
parent2b39640b0bbf7459b305d8a98bb01f197975b8d9 (diff)
downloadruby-02f15542245222ee392e68fb244b3b8c4a12ad82.tar.gz
Implement object shapes for T_CLASS and T_MODULE (#6637)
* Avoid RCLASS_IV_TBL in marshal.c * Avoid RCLASS_IV_TBL for class names * Avoid RCLASS_IV_TBL for autoload * Avoid RCLASS_IV_TBL for class variables * Avoid copying RCLASS_IV_TBL onto ICLASSes * Use object shapes for Class and Module IVs
Diffstat (limited to 'internal/class.h')
-rw-r--r--internal/class.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/class.h b/internal/class.h
index 63fe84c6ab..784d508e20 100644
--- a/internal/class.h
+++ b/internal/class.h
@@ -33,7 +33,7 @@ struct rb_cvar_class_tbl_entry {
};
struct rb_classext_struct {
- struct st_table *iv_tbl;
+ VALUE *iv_ptr;
struct rb_id_table *const_tbl;
struct rb_id_table *callable_m_tbl;
struct rb_id_table *cc_tbl; /* ID -> [[ci, cc1], cc2, ...] */
@@ -75,9 +75,9 @@ typedef struct rb_classext_struct rb_classext_t;
#else
# define RCLASS_EXT(c) (RCLASS(c)->ptr)
#endif
-#define RCLASS_IV_TBL(c) (RCLASS_EXT(c)->iv_tbl)
#define RCLASS_CONST_TBL(c) (RCLASS_EXT(c)->const_tbl)
#define RCLASS_M_TBL(c) (RCLASS(c)->m_tbl)
+#define RCLASS_IVPTR(c) (RCLASS_EXT(c)->iv_ptr)
#define RCLASS_CALLABLE_M_TBL(c) (RCLASS_EXT(c)->callable_m_tbl)
#define RCLASS_CC_TBL(c) (RCLASS_EXT(c)->cc_tbl)
#define RCLASS_CVC_TBL(c) (RCLASS_EXT(c)->cvc_tbl)