aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/ruby/ruby.h2
-rw-r--r--internal.h24
-rw-r--r--method.h19
3 files changed, 24 insertions, 21 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index ff1c463a29..ac0cecd952 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -478,7 +478,7 @@ enum ruby_value_type {
RUBY_T_FIXNUM = 0x15,
RUBY_T_UNDEF = 0x16,
- RUBY_T_IMEMO = 0x1a,
+ RUBY_T_IMEMO = 0x1a, /*!< @see imemo_type */
RUBY_T_NODE = 0x1b,
RUBY_T_ICLASS = 0x1c,
RUBY_T_ZOMBIE = 0x1d,
diff --git a/internal.h b/internal.h
index 7f21eb5a01..6175949351 100644
--- a/internal.h
+++ b/internal.h
@@ -837,10 +837,10 @@ struct RIMemo {
enum imemo_type {
imemo_env = 0,
- imemo_cref = 1,
- imemo_svar = 2,
+ imemo_cref = 1, /*!< class reference */
+ imemo_svar = 2, /*!< special variable */
imemo_throw_data = 3,
- imemo_ifunc = 4,
+ imemo_ifunc = 4, /*!< iterator function */
imemo_memo = 5,
imemo_ment = 6,
imemo_iseq = 7,
@@ -877,22 +877,21 @@ imemo_type_p(VALUE imemo, enum imemo_type imemo_type)
#define IMEMO_FL_USER3 FL_USER7
#define IMEMO_FL_USER4 FL_USER8
-/* CREF in method.h */
-
-/* SVAR */
+/* CREF (Class REFerence) is defined in method.h */
+/*! SVAR (Special VARiable) */
struct vm_svar {
VALUE flags;
- const VALUE cref_or_me;
+ const VALUE cref_or_me; /*!< class reference or rb_method_entry_t */
const VALUE lastline;
const VALUE backref;
const VALUE others;
};
-/* THROW_DATA */
#define THROW_DATA_CONSUMED IMEMO_FL_USER0
+/*! THROW_DATA */
struct vm_throw_data {
VALUE flags;
VALUE reserved;
@@ -903,7 +902,7 @@ struct vm_throw_data {
#define THROW_DATA_P(err) RB_TYPE_P((VALUE)(err), T_IMEMO)
-/* IFUNC */
+/* IFUNC (Internal FUNCtion) */
struct vm_ifunc_argc {
#if SIZEOF_INT * 2 > SIZEOF_VALUE
@@ -914,6 +913,7 @@ struct vm_ifunc_argc {
#endif
};
+/*! IFUNC (Internal FUNCtion) */
struct vm_ifunc {
VALUE flags;
VALUE reserved;
@@ -938,8 +938,10 @@ typedef struct rb_imemo_alloc_struct {
size_t cnt; /* buffer size in VALUE */
} rb_imemo_alloc_t;
-/* MEMO */
-
+/*! MEMO
+ *
+ * @see imemo_type
+ * */
struct MEMO {
VALUE flags;
VALUE reserved;
diff --git a/method.h b/method.h
index acdf67f762..fe02db3000 100644
--- a/method.h
+++ b/method.h
@@ -37,6 +37,7 @@ typedef struct rb_scope_visi_struct {
unsigned int module_func : 1;
} rb_scope_visibility_t;
+/*! CREF (Class REFerence) */
typedef struct rb_cref_struct {
VALUE flags;
const VALUE refinements;
@@ -98,18 +99,18 @@ METHOD_ENTRY_FLAGS_COPY(rb_method_entry_t *dst, const rb_method_entry_t *src)
}
typedef enum {
- VM_METHOD_TYPE_ISEQ,
- VM_METHOD_TYPE_CFUNC,
- VM_METHOD_TYPE_ATTRSET,
- VM_METHOD_TYPE_IVAR,
+ VM_METHOD_TYPE_ISEQ, /*!< Ruby method */
+ VM_METHOD_TYPE_CFUNC, /*!< C method */
+ VM_METHOD_TYPE_ATTRSET, /*!< attr_writer or attr_accessor */
+ VM_METHOD_TYPE_IVAR, /*!< attr_reader or attr_accessor */
VM_METHOD_TYPE_BMETHOD,
VM_METHOD_TYPE_ZSUPER,
VM_METHOD_TYPE_ALIAS,
VM_METHOD_TYPE_UNDEF,
VM_METHOD_TYPE_NOTIMPLEMENTED,
- VM_METHOD_TYPE_OPTIMIZED, /* Kernel#send, Proc#call, etc */
- VM_METHOD_TYPE_MISSING, /* wrapper for method_missing(id) */
- VM_METHOD_TYPE_REFINED,
+ VM_METHOD_TYPE_OPTIMIZED, /*!< Kernel#send, Proc#call, etc */
+ VM_METHOD_TYPE_MISSING, /*!< wrapper for method_missing(id) */
+ VM_METHOD_TYPE_REFINED, /*!< refinement */
END_OF_ENUMERATION(VM_METHOD_TYPE)
} rb_method_type_t;
@@ -120,8 +121,8 @@ typedef struct rb_iseq_struct rb_iseq_t;
#endif
typedef struct rb_method_iseq_struct {
- const rb_iseq_t * const iseqptr; /* should be separated from iseqval */
- rb_cref_t * const cref; /* should be marked */
+ const rb_iseq_t * const iseqptr; /*!< iseq pointer, should be separated from iseqval */
+ rb_cref_t * const cref; /*!< class reference, should be marked */
} rb_method_iseq_t; /* check rb_add_method_iseq() when modify the fields */
typedef struct rb_method_cfunc_struct {