Ruby 3.5.0dev (2025-05-15 revision 3d1b8e7298957711998bfb2e8cce09bcc17e4d46)
Data Fields
rb_classext_struct Struct Reference

Data Fields

const rb_namespace_tns
 
VALUE super
 
VALUEfields
 
struct rb_id_tablem_tbl
 
struct rb_id_tableconst_tbl
 
struct rb_id_tablecallable_m_tbl
 
struct rb_id_tablecc_tbl
 
struct rb_id_tablecvc_tbl
 
VALUEsuperclasses
 
struct rb_subclass_anchorsubclasses
 The head of subclasses is a blank (w/o klass) entry to be referred from anchor (and be never deleted).
 
rb_ns_subclasses_tns_super_subclasses
 The ns_super_subclasses points the ns_subclasses struct to retreive the subclasses of the super class in a specific namespace.
 
rb_ns_subclasses_tns_module_subclasses
 In the case that this is an ICLASS, ns_module_subclasses points to the link in the module's subclasses list that indicates that the klass has been included.
 
const VALUE origin_
 
const VALUE refined_class
 
union { 
 
   struct { 
 
      rb_alloc_func_t   allocator 
 
   }   class 
 
   struct { 
 
      VALUE   attached_object 
 
   }   singleton_class 
 
   struct { 
 
      const VALUE   includer 
 
   }   iclass 
 
as 
 
attr_index_t max_iv_count
 
uint16_t superclass_depth
 
unsigned char variation_count
 
bool permanent_classpath: 1
 
bool cloned: 1
 
bool shared_const_tbl: 1
 
bool iclass_is_origin: 1
 
bool iclass_origin_shared_mtbl: 1
 
bool superclasses_owner: 1
 
bool superclasses_with_self: 1
 
VALUE classpath
 

Detailed Description

Definition at line 79 of file class.h.

Field Documentation

◆ allocator

rb_alloc_func_t rb_classext_struct::allocator

Definition at line 113 of file class.h.

◆ attached_object

VALUE rb_classext_struct::attached_object

Definition at line 116 of file class.h.

◆ callable_m_tbl

struct rb_id_table* rb_classext_struct::callable_m_tbl

Definition at line 85 of file class.h.

◆ cc_tbl

struct rb_id_table* rb_classext_struct::cc_tbl

Definition at line 86 of file class.h.

◆ classpath

VALUE rb_classext_struct::classpath

Definition at line 132 of file class.h.

◆ cloned

bool rb_classext_struct::cloned

Definition at line 126 of file class.h.

◆ const_tbl

struct rb_id_table* rb_classext_struct::const_tbl

Definition at line 84 of file class.h.

◆ cvc_tbl

struct rb_id_table* rb_classext_struct::cvc_tbl

Definition at line 87 of file class.h.

◆ fields

VALUE* rb_classext_struct::fields

Definition at line 82 of file class.h.

◆ iclass_is_origin

bool rb_classext_struct::iclass_is_origin

Definition at line 128 of file class.h.

◆ iclass_origin_shared_mtbl

bool rb_classext_struct::iclass_origin_shared_mtbl

Definition at line 129 of file class.h.

◆ includer

const VALUE rb_classext_struct::includer

Definition at line 119 of file class.h.

◆ m_tbl

struct rb_id_table* rb_classext_struct::m_tbl

Definition at line 83 of file class.h.

◆ max_iv_count

attr_index_t rb_classext_struct::max_iv_count

Definition at line 122 of file class.h.

◆ ns

const rb_namespace_t* rb_classext_struct::ns

Definition at line 80 of file class.h.

◆ ns_module_subclasses

rb_ns_subclasses_t* rb_classext_struct::ns_module_subclasses

In the case that this is an ICLASS, ns_module_subclasses points to the link in the module's subclasses list that indicates that the klass has been included.

Hopefully that makes sense.

Definition at line 107 of file class.h.

◆ ns_super_subclasses

rb_ns_subclasses_t* rb_classext_struct::ns_super_subclasses

The ns_super_subclasses points the ns_subclasses struct to retreive the subclasses of the super class in a specific namespace.

In compaction GCs, collecting a classext should trigger the deletion of a rb_subclass_entry from the super's subclasses. But it may be prevented by the read barrier. Fetching the super's subclasses for a ns is to avoid the read barrier in that process.

Definition at line 101 of file class.h.

◆ origin_

const VALUE rb_classext_struct::origin_

Definition at line 109 of file class.h.

◆ permanent_classpath

bool rb_classext_struct::permanent_classpath

Definition at line 125 of file class.h.

◆ refined_class

const VALUE rb_classext_struct::refined_class

Definition at line 110 of file class.h.

◆ shared_const_tbl

bool rb_classext_struct::shared_const_tbl

Definition at line 127 of file class.h.

◆ subclasses

struct rb_subclass_anchor* rb_classext_struct::subclasses

The head of subclasses is a blank (w/o klass) entry to be referred from anchor (and be never deleted).

(anchor -> head -> 1st-entry)

Definition at line 93 of file class.h.

◆ super

VALUE rb_classext_struct::super

Definition at line 81 of file class.h.

◆ superclass_depth

uint16_t rb_classext_struct::superclass_depth

Definition at line 123 of file class.h.

◆ superclasses

VALUE* rb_classext_struct::superclasses

Definition at line 88 of file class.h.

◆ superclasses_owner

bool rb_classext_struct::superclasses_owner

Definition at line 130 of file class.h.

◆ superclasses_with_self

bool rb_classext_struct::superclasses_with_self

Definition at line 131 of file class.h.

◆ variation_count

unsigned char rb_classext_struct::variation_count

Definition at line 124 of file class.h.


The documentation for this struct was generated from the following file: