From ae90fa981a18119a06b152bfec203e902aeed3b9 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Tue, 18 Apr 2023 13:25:01 -0400 Subject: [DOC] Documentation for flags of RClass --- class.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'class.c') diff --git a/class.c b/class.c index 1ae235d6ab..114df2bbd7 100644 --- a/class.c +++ b/class.c @@ -30,6 +30,42 @@ #include "ruby/st.h" #include "vm_core.h" +/* Flags of T_CLASS + * + * 2: RCLASS_SUPERCLASSES_INCLUDE_SELF + * The RCLASS_SUPERCLASSES contains the class as the last element. + * This means that this class owns the RCLASS_SUPERCLASSES list. + * if !SHAPE_IN_BASIC_FLAGS + * 4-19: SHAPE_FLAG_MASK + * Shape ID for the class. + * endif + */ + +/* Flags of T_ICLASS + * + * 0: RICLASS_IS_ORIGIN + * 3: RICLASS_ORIGIN_SHARED_MTBL + * The T_ICLASS does not own the method table. + * if !SHAPE_IN_BASIC_FLAGS + * 4-19: SHAPE_FLAG_MASK + * Shape ID. This is set but not used. + * endif + */ + +/* Flags of T_MODULE + * + * 1: RMODULE_ALLOCATED_BUT_NOT_INITIALIZED + * Module has not been initialized. + * 2: RCLASS_SUPERCLASSES_INCLUDE_SELF + * See RCLASS_SUPERCLASSES_INCLUDE_SELF in T_CLASS. + * 3: RMODULE_IS_REFINEMENT + * Module is used for refinements. + * if !SHAPE_IN_BASIC_FLAGS + * 4-19: SHAPE_FLAG_MASK + * Shape ID for the module. + * endif + */ + #define METACLASS_OF(k) RBASIC(k)->klass #define SET_METACLASS_OF(k, cls) RBASIC_SET_CLASS(k, cls) -- cgit v1.2.3