1#ifndef INTERNAL_CLASS_H
2#define INTERNAL_CLASS_H
13#include "internal/gc.h"
37#if SIZEOF_SERIAL_T == SIZEOF_VALUE
51#if SIZEOF_SERIAL_T != SIZEOF_VALUE
64#if SIZEOF_SERIAL_T == SIZEOF_VALUE
76#define RCLASS_EXT(c) (RCLASS(c)->ptr)
77#define RCLASS_IV_TBL(c) (RCLASS_EXT(c)->iv_tbl)
78#define RCLASS_CONST_TBL(c) (RCLASS_EXT(c)->const_tbl)
79#if SIZEOF_SERIAL_T == SIZEOF_VALUE
80# define RCLASS_M_TBL(c) (RCLASS_EXT(c)->m_tbl)
82# define RCLASS_M_TBL(c) (RCLASS(c)->m_tbl)
84#define RCLASS_CALLABLE_M_TBL(c) (RCLASS_EXT(c)->callable_m_tbl)
85#define RCLASS_CC_TBL(c) (RCLASS_EXT(c)->cc_tbl)
86#define RCLASS_IV_INDEX_TBL(c) (RCLASS_EXT(c)->iv_index_tbl)
87#define RCLASS_ORIGIN(c) (RCLASS_EXT(c)->origin_)
88#define RCLASS_REFINED_CLASS(c) (RCLASS_EXT(c)->refined_class)
89#if SIZEOF_SERIAL_T == SIZEOF_VALUE
90# define RCLASS_SERIAL(c) (RCLASS(c)->class_serial)
92# define RCLASS_SERIAL(c) (RCLASS_EXT(c)->class_serial)
94#define RCLASS_INCLUDER(c) (RCLASS_EXT(c)->includer)
96#define RICLASS_IS_ORIGIN FL_USER5
97#define RCLASS_CLONED FL_USER6
98#define RICLASS_ORIGIN_SHARED_MTBL FL_USER8
122static inline void RICLASS_SET_ORIGIN_SHARED_MTBL(
VALUE iclass);
125static inline void RCLASS_SET_INCLUDER(
VALUE iclass,
VALUE klass);
140RICLASS_SET_ORIGIN_SHARED_MTBL(
VALUE iclass)
146RICLASS_OWNS_M_TBL_P(
VALUE iclass)
160 return RCLASS(klass)->super;
#define MJIT_SYMBOL_EXPORT_END
#define MJIT_SYMBOL_EXPORT_BEGIN
void rb_class_foreach_subclass(VALUE klass, void(*f)(VALUE, VALUE), VALUE)
VALUE rb_obj_private_methods(int argc, const VALUE *argv, VALUE obj)
void rb_class_subclass_add(VALUE super, VALUE klass)
VALUE rb_obj_methods(int argc, const VALUE *argv, VALUE obj)
void rb_class_detach_subclasses(VALUE)
VALUE rb_singleton_class_clone_and_attach(VALUE obj, VALUE attach)
VALUE rb_include_class_new(VALUE, VALUE)
VALUE rb_obj_protected_methods(int argc, const VALUE *argv, VALUE obj)
int rb_singleton_class_internal_p(VALUE sklass)
VALUE rb_class_boot(VALUE)
A utility function that wraps class_alloc.
void rb_class_detach_module_subclasses(VALUE)
VALUE rb_special_singleton_class(VALUE)
VALUE rb_class_inherited(VALUE, VALUE)
Calls Class::inherited.
void rb_class_remove_from_module_subclasses(VALUE)
VALUE rb_singleton_class_get(VALUE obj)
Returns the singleton class of obj, or nil if obj is not a singleton object.
VALUE rb_make_metaclass(VALUE, VALUE)
VALUE rb_obj_public_methods(int argc, const VALUE *argv, VALUE obj)
void rb_class_remove_from_super_subclasses(VALUE)
int rb_class_has_methods(VALUE c)
VALUE rb_keyword_error_new(const char *, VALUE)
void rb_undef_methods_from(VALUE klass, VALUE super)
VALUE(* rb_alloc_func_t)(VALUE)
#define RCLASS_INCLUDER(c)
#define RICLASS_ORIGIN_SHARED_MTBL
#define RICLASS_IS_ORIGIN
#define RB_OBJ_WRITE(a, slot, b)
WB for new reference from ‘a’ to ‘b’.
Internal header for rb_serial_t.
unsigned LONG_LONG rb_serial_t
struct rb_classext_struct * ptr
struct rb_subclass_entry ** parent_subclasses
struct st_table * iv_index_tbl
struct rb_id_table * callable_m_tbl
struct rb_subclass_entry ** module_subclasses
In the case that this is an ICLASS, module_subclasses points to the link in the module's subclasses l...
struct rb_subclass_entry * subclasses
struct rb_id_table * const_tbl
struct rb_id_table * cc_tbl
rb_alloc_func_t allocator
struct rb_id_table * m_tbl
const VALUE refined_class
struct rb_subclass_entry * next