Ruby: method.h Source File

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

method.h
Go to the documentation of this file.
1#ifndef RUBY_METHOD_H
2#define RUBY_METHOD_H 1
3/**********************************************************************
4
5 method.h -
6
7 $Author$
8 created at: Wed Jul 15 20:02:33 2009
9
10 Copyright (C) 2009 Koichi Sasada
11
12**********************************************************************/
13
14#include "internal.h"
15#include "internal/imemo.h"
16#include "internal/compilers.h"
17#include "internal/static_assert.h"
18
19#ifndef END_OF_ENUMERATION
20# if defined(__GNUC__) &&! defined(__STRICT_ANSI__)
21# define END_OF_ENUMERATION(key)
22# else
23# define END_OF_ENUMERATION(key) END_OF_##key##_PLACEHOLDER = 0
24# endif
25#endif
26
27/* cref */
28
29 typedef enum {
30 METHOD_VISI_UNDEF = 0x00,
31 METHOD_VISI_PUBLIC = 0x01,
32 METHOD_VISI_PRIVATE = 0x02,
33 METHOD_VISI_PROTECTED = 0x03,
34
35 METHOD_VISI_MASK = 0x03
36} rb_method_visibility_t;
37
38 typedef struct rb_scope_visi_struct {
39 BITFIELD(rb_method_visibility_t, method_visi, 3);
40 unsigned int module_func : 1;
41} rb_scope_visibility_t;
42
44 typedef struct rb_cref_struct {
45 VALUE flags;
46 VALUE refinements;
47 VALUE klass;
48 struct rb_cref_struct * next;
49 const rb_scope_visibility_t scope_visi;
50} rb_cref_t;
51
52/* method data type */
53
54 typedef struct rb_method_entry_struct {
55 VALUE flags;
56 VALUE defined_class;
57 struct rb_method_definition_struct * const def;
58 ID called_id;
59 VALUE owner;
60} rb_method_entry_t;
61
62 typedef struct rb_callable_method_entry_struct { /* same fields with rb_method_entry_t */
63 VALUE flags;
64 const VALUE defined_class;
65 struct rb_method_definition_struct * const def;
66 ID called_id;
67 const VALUE owner;
68} rb_callable_method_entry_t;
69
70#define METHOD_ENTRY_VISI(me) (rb_method_visibility_t)(((me)->flags & (IMEMO_FL_USER0 | IMEMO_FL_USER1)) >> (IMEMO_FL_USHIFT+0))
71#define METHOD_ENTRY_BASIC(me) (int) (((me)->flags & (IMEMO_FL_USER2 )) >> (IMEMO_FL_USHIFT+2))
72#define METHOD_ENTRY_COMPLEMENTED(me) ((me)->flags & IMEMO_FL_USER3)
73#define METHOD_ENTRY_COMPLEMENTED_SET(me) ((me)->flags |= IMEMO_FL_USER3)
74#define METHOD_ENTRY_CACHED(me) ((me)->flags & IMEMO_FL_USER4)
75#define METHOD_ENTRY_CACHED_SET(me) ((me)->flags |= IMEMO_FL_USER4)
76#define METHOD_ENTRY_INVALIDATED(me) ((me)->flags & IMEMO_FL_USER5)
77#define METHOD_ENTRY_INVALIDATED_SET(me) ((me)->flags |= IMEMO_FL_USER5)
78#define METHOD_ENTRY_CACHEABLE(me) !(METHOD_ENTRY_VISI(me) == METHOD_VISI_PROTECTED)
79
80static inline void
81METHOD_ENTRY_VISI_SET(rb_method_entry_t *me, rb_method_visibility_t visi)
82{
83 VM_ASSERT((int)visi >= 0 && visi <= 3);
84 me->flags = (me->flags & ~(IMEMO_FL_USER0 | IMEMO_FL_USER1)) | (visi << (IMEMO_FL_USHIFT+0));
85}
86static inline void
87METHOD_ENTRY_BASIC_SET(rb_method_entry_t *me, unsigned int basic)
88{
89 VM_ASSERT(basic <= 1);
90 me->flags = (me->flags & ~(IMEMO_FL_USER2 )) | (basic << (IMEMO_FL_USHIFT+2));
91}
92static inline void
93METHOD_ENTRY_FLAGS_SET(rb_method_entry_t *me, rb_method_visibility_t visi, unsigned int basic)
94{
95 VM_ASSERT((int)visi >= 0 && visi <= 3);
96 VM_ASSERT(basic <= 1);
97 me->flags =
98 (me->flags & ~(IMEMO_FL_USER0|IMEMO_FL_USER1|IMEMO_FL_USER2)) |
99 ((visi << (IMEMO_FL_USHIFT+0)) | (basic << (IMEMO_FL_USHIFT+2)));
100}
101static inline void
102METHOD_ENTRY_FLAGS_COPY(rb_method_entry_t *dst, const rb_method_entry_t *src)
103{
104 dst->flags =
105 (dst->flags & ~(IMEMO_FL_USER0|IMEMO_FL_USER1|IMEMO_FL_USER2)) |
106 (src->flags & (IMEMO_FL_USER0|IMEMO_FL_USER1|IMEMO_FL_USER2));
107}
108
109 typedef enum {
110 VM_METHOD_TYPE_ISEQ,
111 VM_METHOD_TYPE_CFUNC,
112 VM_METHOD_TYPE_ATTRSET,
113 VM_METHOD_TYPE_IVAR,
114 VM_METHOD_TYPE_BMETHOD,
115 VM_METHOD_TYPE_ZSUPER,
116 VM_METHOD_TYPE_ALIAS,
117 VM_METHOD_TYPE_UNDEF,
118 VM_METHOD_TYPE_NOTIMPLEMENTED,
119 VM_METHOD_TYPE_OPTIMIZED,
120 VM_METHOD_TYPE_MISSING,
121 VM_METHOD_TYPE_REFINED,
123 END_OF_ENUMERATION(VM_METHOD_TYPE)
124} rb_method_type_t;
125#define VM_METHOD_TYPE_MINIMUM_BITS 4
126 STATIC_ASSERT(VM_METHOD_TYPE_MINIMUM_BITS,
127 VM_METHOD_TYPE_REFINED <= (1<<VM_METHOD_TYPE_MINIMUM_BITS));
128
129#ifndef rb_iseq_t
130 typedef struct rb_iseq_struct rb_iseq_t;
131#define rb_iseq_t rb_iseq_t
132#endif
133
134 typedef struct rb_method_iseq_struct {
135 rb_iseq_t * iseqptr;
136 rb_cref_t * cref;
137} rb_method_iseq_t; /* check rb_add_method_iseq() when modify the fields */
138
139 typedef struct rb_method_cfunc_struct {
140 VALUE (*func)(ANYARGS);
141 VALUE (*invoker)(VALUE recv, int argc, const VALUE *argv, VALUE (*func)(ANYARGS));
142 int argc;
143} rb_method_cfunc_t;
144
145 typedef struct rb_method_attr_struct {
146 ID id;
147 VALUE location; /* should be marked */
148} rb_method_attr_t;
149
150 typedef struct rb_method_alias_struct {
151 struct rb_method_entry_struct * original_me; /* original_me->klass is original owner */
152} rb_method_alias_t;
153
154 typedef struct rb_method_refined_struct {
155 struct rb_method_entry_struct * orig_me;
156 VALUE owner;
157} rb_method_refined_t;
158
159 typedef struct rb_method_bmethod_struct {
160 VALUE proc; /* should be marked */
161 struct rb_hook_list_struct *hooks;
162 VALUE defined_ractor;
163} rb_method_bmethod_t;
164
165 enum method_optimized_type {
166 OPTIMIZED_METHOD_TYPE_SEND,
167 OPTIMIZED_METHOD_TYPE_CALL,
168 OPTIMIZED_METHOD_TYPE_BLOCK_CALL,
169 OPTIMIZED_METHOD_TYPE__MAX
170};
171
172 struct rb_method_definition_struct {
173 BITFIELD(rb_method_type_t, type, VM_METHOD_TYPE_MINIMUM_BITS);
174 int alias_count : 28;
175 int complemented_count : 28;
176 unsigned int no_redef_warning: 1;
177
178 union {
179 rb_method_iseq_t iseq;
180 rb_method_cfunc_t cfunc;
181 rb_method_attr_t attr;
182 rb_method_alias_t alias;
183 rb_method_refined_t refined;
184 rb_method_bmethod_t bmethod;
185
186 enum method_optimized_type optimize_type;
187 } body;
188
189 ID original_id;
190 uintptr_t method_serial;
191};
192
193struct rb_id_table;
194
195 typedef struct rb_method_definition_struct rb_method_definition_t;
196 STATIC_ASSERT(sizeof_method_def, offsetof(rb_method_definition_t, body)==8);
197
198#define UNDEFINED_METHOD_ENTRY_P(me) (!(me) || !(me)->def || (me)->def->type == VM_METHOD_TYPE_UNDEF)
199#define UNDEFINED_REFINED_METHOD_P(def) \
200 ((def)->type == VM_METHOD_TYPE_REFINED && \
201 UNDEFINED_METHOD_ENTRY_P((def)->body.refined.orig_me))
202
203void rb_add_method_cfunc(VALUE klass, ID mid, VALUE (*func)(ANYARGS), int argc, rb_method_visibility_t visi);
204void rb_add_method_iseq(VALUE klass, ID mid, const rb_iseq_t *iseq, rb_cref_t *cref, rb_method_visibility_t visi);
205void rb_add_refined_method_entry(VALUE refined_class, ID mid);
206void rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *option, rb_method_visibility_t visi);
207
208 rb_method_entry_t *rb_method_entry_set(VALUE klass, ID mid, const rb_method_entry_t *, rb_method_visibility_t noex);
209 rb_method_entry_t *rb_method_entry_create(ID called_id, VALUE klass, rb_method_visibility_t visi, const rb_method_definition_t *def);
210
211const rb_method_entry_t *rb_method_entry_at(VALUE obj, ID id);
212
213const rb_method_entry_t *rb_method_entry(VALUE klass, ID id);
214const rb_method_entry_t *rb_method_entry_with_refinements(VALUE klass, ID id, VALUE *defined_class);
215const rb_method_entry_t *rb_method_entry_without_refinements(VALUE klass, ID id, VALUE *defined_class);
216const rb_method_entry_t *rb_resolve_refined_method(VALUE refinements, const rb_method_entry_t *me);
217RUBY_SYMBOL_EXPORT_BEGIN
218const rb_method_entry_t *rb_resolve_me_location(const rb_method_entry_t *, VALUE[5]);
219RUBY_SYMBOL_EXPORT_END
220
221const rb_callable_method_entry_t *rb_callable_method_entry(VALUE klass, ID id);
222const rb_callable_method_entry_t *rb_callable_method_entry_with_refinements(VALUE klass, ID id, VALUE *defined_class);
223const rb_callable_method_entry_t *rb_callable_method_entry_without_refinements(VALUE klass, ID id, VALUE *defined_class);
224
225int rb_method_entry_arity(const rb_method_entry_t *me);
226int rb_method_entry_eq(const rb_method_entry_t *m1, const rb_method_entry_t *m2);
227 st_index_t rb_hash_method_entry(st_index_t hash, const rb_method_entry_t *me);
228
229 VALUE rb_method_entry_location(const rb_method_entry_t *me);
230
231void rb_free_method_entry(const rb_method_entry_t *me);
232
233const rb_method_entry_t *rb_method_entry_clone(const rb_method_entry_t *me);
234const rb_callable_method_entry_t *rb_method_entry_complement_defined_class(const rb_method_entry_t *src_me, ID called_id, VALUE defined_class);
235void rb_method_entry_copy(rb_method_entry_t *dst, const rb_method_entry_t *src);
236
237void rb_method_table_insert(VALUE klass, struct rb_id_table *table, ID method_id, const rb_method_entry_t *me);
238
239void rb_scope_visibility_set(rb_method_visibility_t);
240
241 VALUE rb_unnamed_parameters(int arity);
242
243void rb_clear_method_cache(VALUE klass_or_module, ID mid);
244void rb_clear_method_cache_all(void);
245
246#endif /* RUBY_METHOD_H */
offsetof
#define offsetof(p_type, field)
Definition: addrinfo.h:186
compilers.h
Internal header absorbing C compipler differences.
imemo.h
IMEMO: Internal memo object.
IMEMO_FL_USER1
#define IMEMO_FL_USER1
Definition: imemo.h:28
IMEMO_FL_USER0
#define IMEMO_FL_USER0
Definition: imemo.h:27
IMEMO_FL_USHIFT
#define IMEMO_FL_USHIFT
Definition: imemo.h:26
IMEMO_FL_USER2
#define IMEMO_FL_USER2
Definition: imemo.h:29
STATIC_ASSERT
#define STATIC_ASSERT
Definition: static_assert.h:14
internal.h
rb_method_entry_clone
const rb_method_entry_t * rb_method_entry_clone(const rb_method_entry_t *me)
Definition: vm_method.c:606
rb_method_entry_eq
int rb_method_entry_eq(const rb_method_entry_t *m1, const rb_method_entry_t *m2)
Definition: vm_method.c:1821
rb_callable_method_entry_without_refinements
const rb_callable_method_entry_t * rb_callable_method_entry_without_refinements(VALUE klass, ID id, VALUE *defined_class)
Definition: vm_method.c:1253
rb_method_cfunc_t
struct rb_method_cfunc_struct rb_method_cfunc_t
rb_method_entry
const rb_method_entry_t * rb_method_entry(VALUE klass, ID id)
Definition: vm_method.c:1023
rb_method_entry_arity
int rb_method_entry_arity(const rb_method_entry_t *me)
Definition: proc.c:2684
rb_callable_method_entry_with_refinements
const rb_callable_method_entry_t * rb_callable_method_entry_with_refinements(VALUE klass, ID id, VALUE *defined_class)
Definition: vm_method.c:1235
rb_add_method_iseq
void rb_add_method_iseq(VALUE klass, ID mid, const rb_iseq_t *iseq, rb_cref_t *cref, rb_method_visibility_t visi)
Definition: vm_method.c:910
rb_method_attr_t
struct rb_method_attr_struct rb_method_attr_t
rb_resolve_refined_method
const rb_method_entry_t * rb_resolve_refined_method(VALUE refinements, const rb_method_entry_t *me)
Definition: vm_method.c:1294
rb_add_method
void rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *option, rb_method_visibility_t visi)
Definition: vm_method.c:900
rb_method_entry_copy
void rb_method_entry_copy(rb_method_entry_t *dst, const rb_method_entry_t *src)
Definition: vm_method.c:655
rb_add_refined_method_entry
void rb_add_refined_method_entry(VALUE refined_class, ID mid)
Definition: vm_method.c:709
rb_clear_method_cache_all
void rb_clear_method_cache_all(void)
Definition: vm_method.c:280
rb_callable_method_entry_t
struct rb_callable_method_entry_struct rb_callable_method_entry_t
rb_method_table_insert
void rb_method_table_insert(VALUE klass, struct rb_id_table *table, ID method_id, const rb_method_entry_t *me)
Definition: vm_method.c:286
rb_free_method_entry
void rb_free_method_entry(const rb_method_entry_t *me)
Definition: vm_method.c:358
rb_method_entry_t
struct rb_method_entry_struct rb_method_entry_t
rb_method_visibility_t
rb_method_visibility_t
Definition: method.h:29
METHOD_VISI_PRIVATE
@ METHOD_VISI_PRIVATE
Definition: method.h:32
METHOD_VISI_MASK
@ METHOD_VISI_MASK
Definition: method.h:35
METHOD_VISI_PROTECTED
@ METHOD_VISI_PROTECTED
Definition: method.h:33
METHOD_VISI_PUBLIC
@ METHOD_VISI_PUBLIC
Definition: method.h:31
METHOD_VISI_UNDEF
@ METHOD_VISI_UNDEF
Definition: method.h:30
rb_method_entry_set
rb_method_entry_t * rb_method_entry_set(VALUE klass, ID mid, const rb_method_entry_t *, rb_method_visibility_t noex)
Definition: vm_method.c:939
VM_METHOD_TYPE_MINIMUM_BITS
#define VM_METHOD_TYPE_MINIMUM_BITS
Definition: method.h:125
rb_callable_method_entry
const rb_callable_method_entry_t * rb_callable_method_entry(VALUE klass, ID id)
Definition: vm_method.c:1177
rb_method_iseq_t
struct rb_method_iseq_struct rb_method_iseq_t
rb_method_type_t
rb_method_type_t
Definition: method.h:109
VM_METHOD_TYPE_ISEQ
@ VM_METHOD_TYPE_ISEQ
Ruby method.
Definition: method.h:110
VM_METHOD_TYPE_ATTRSET
@ VM_METHOD_TYPE_ATTRSET
attr_writer or attr_accessor
Definition: method.h:112
VM_METHOD_TYPE_CFUNC
@ VM_METHOD_TYPE_CFUNC
C method.
Definition: method.h:111
VM_METHOD_TYPE_OPTIMIZED
@ VM_METHOD_TYPE_OPTIMIZED
Kernel::send, Proc::call, etc.
Definition: method.h:119
VM_METHOD_TYPE_REFINED
@ VM_METHOD_TYPE_REFINED
refinement
Definition: method.h:121
VM_METHOD_TYPE_NOTIMPLEMENTED
@ VM_METHOD_TYPE_NOTIMPLEMENTED
Definition: method.h:118
VM_METHOD_TYPE_MISSING
@ VM_METHOD_TYPE_MISSING
wrapper for method_missing(id)
Definition: method.h:120
VM_METHOD_TYPE_BMETHOD
@ VM_METHOD_TYPE_BMETHOD
Definition: method.h:114
VM_METHOD_TYPE_IVAR
@ VM_METHOD_TYPE_IVAR
attr_reader or attr_accessor
Definition: method.h:113
VM_METHOD_TYPE_ZSUPER
@ VM_METHOD_TYPE_ZSUPER
Definition: method.h:115
VM_METHOD_TYPE_ALIAS
@ VM_METHOD_TYPE_ALIAS
Definition: method.h:116
VM_METHOD_TYPE_UNDEF
@ VM_METHOD_TYPE_UNDEF
Definition: method.h:117
method_optimized_type
method_optimized_type
Definition: method.h:165
OPTIMIZED_METHOD_TYPE_CALL
@ OPTIMIZED_METHOD_TYPE_CALL
Definition: method.h:167
OPTIMIZED_METHOD_TYPE__MAX
@ OPTIMIZED_METHOD_TYPE__MAX
Definition: method.h:169
OPTIMIZED_METHOD_TYPE_BLOCK_CALL
@ OPTIMIZED_METHOD_TYPE_BLOCK_CALL
Definition: method.h:168
OPTIMIZED_METHOD_TYPE_SEND
@ OPTIMIZED_METHOD_TYPE_SEND
Definition: method.h:166
rb_unnamed_parameters
VALUE rb_unnamed_parameters(int arity)
Definition: proc.c:1393
rb_resolve_me_location
const rb_method_entry_t * rb_resolve_me_location(const rb_method_entry_t *, VALUE[5])
Definition: thread.c:5694
rb_scope_visibility_t
struct rb_scope_visi_struct rb_scope_visibility_t
rb_method_entry_with_refinements
const rb_method_entry_t * rb_method_entry_with_refinements(VALUE klass, ID id, VALUE *defined_class)
Definition: vm_method.c:1208
rb_clear_method_cache
void rb_clear_method_cache(VALUE klass_or_module, ID mid)
Definition: vm_method.c:236
rb_method_entry_without_refinements
const rb_method_entry_t * rb_method_entry_without_refinements(VALUE klass, ID id, VALUE *defined_class)
Definition: vm_method.c:1247
rb_method_bmethod_t
struct rb_method_bmethod_struct rb_method_bmethod_t
rb_method_entry_location
VALUE rb_method_entry_location(const rb_method_entry_t *me)
Definition: proc.c:2869
rb_method_refined_t
struct rb_method_refined_struct rb_method_refined_t
rb_scope_visibility_set
void rb_scope_visibility_set(rb_method_visibility_t)
Definition: vm_method.c:1483
rb_method_entry_at
const rb_method_entry_t * rb_method_entry_at(VALUE obj, ID id)
Definition: vm_method.c:973
rb_add_method_cfunc
void rb_add_method_cfunc(VALUE klass, ID mid, VALUE(*func)(ANYARGS), int argc, rb_method_visibility_t visi)
Definition: vm_method.c:313
rb_method_entry_complement_defined_class
const rb_callable_method_entry_t * rb_method_entry_complement_defined_class(const rb_method_entry_t *src_me, ID called_id, VALUE defined_class)
Definition: vm_method.c:619
rb_hash_method_entry
st_index_t rb_hash_method_entry(st_index_t hash, const rb_method_entry_t *me)
Definition: vm_method.c:1920
rb_cref_t
struct rb_cref_struct rb_cref_t
CREF (Class REFerence)
rb_method_entry_create
rb_method_entry_t * rb_method_entry_create(ID called_id, VALUE klass, rb_method_visibility_t visi, const rb_method_definition_t *def)
Definition: vm_method.c:597
END_OF_ENUMERATION
#define END_OF_ENUMERATION(key)
Definition: method.h:21
rb_method_alias_t
struct rb_method_alias_struct rb_method_alias_t
ruby::backward::cxxanyargs::type
VALUE type(ANYARGS)
ANYARGS-ed function type.
Definition: cxxanyargs.hpp:56
argc
int argc
Definition: ruby.c:240
argv
char ** argv
Definition: ruby.c:241
st_index_t
st_data_t st_index_t
Definition: st.h:50
ANYARGS
#define ANYARGS
Definition: stdarg.h:42
rb_callable_method_entry_struct
Definition: method.h:62
rb_callable_method_entry_struct::called_id
ID called_id
Definition: method.h:66
rb_callable_method_entry_struct::flags
VALUE flags
Definition: method.h:63
rb_callable_method_entry_struct::defined_class
const VALUE defined_class
Definition: method.h:64
rb_callable_method_entry_struct::owner
const VALUE owner
Definition: method.h:67
rb_callable_method_entry_struct::def
struct rb_method_definition_struct *const def
Definition: method.h:65
rb_cref_struct
CREF (Class REFerence)
Definition: method.h:44
rb_cref_struct::scope_visi
const rb_scope_visibility_t scope_visi
Definition: method.h:49
rb_cref_struct::flags
VALUE flags
Definition: method.h:45
rb_cref_struct::refinements
VALUE refinements
Definition: method.h:46
rb_cref_struct::next
struct rb_cref_struct * next
Definition: method.h:48
rb_cref_struct::klass
VALUE klass
Definition: method.h:47
rb_hook_list_struct
Definition: vm_core.h:553
rb_id_table
Definition: id_table.c:41
rb_iseq_struct
Definition: vm_core.h:444
rb_method_alias_struct
Definition: method.h:150
rb_method_alias_struct::original_me
struct rb_method_entry_struct * original_me
Definition: method.h:151
rb_method_attr_struct
Definition: method.h:145
rb_method_attr_struct::id
ID id
Definition: method.h:146
rb_method_attr_struct::location
VALUE location
Definition: method.h:147
rb_method_bmethod_struct
Definition: method.h:159
rb_method_bmethod_struct::defined_ractor
VALUE defined_ractor
Definition: method.h:162
rb_method_bmethod_struct::hooks
struct rb_hook_list_struct * hooks
Definition: method.h:161
rb_method_bmethod_struct::proc
VALUE proc
Definition: method.h:160
rb_method_cfunc_struct
Definition: method.h:139
rb_method_cfunc_struct::invoker
VALUE(* invoker)(VALUE recv, int argc, const VALUE *argv, VALUE(*func)(ANYARGS))
Definition: method.h:141
rb_method_cfunc_struct::argc
int argc
Definition: method.h:142
rb_method_cfunc_struct::func
VALUE(* func)(ANYARGS)
Definition: method.h:140
rb_method_definition_struct
Definition: method.h:172
rb_method_definition_struct::no_redef_warning
unsigned int no_redef_warning
Definition: method.h:176
rb_method_definition_struct::iseq
rb_method_iseq_t iseq
Definition: method.h:179
rb_method_definition_struct::BITFIELD
BITFIELD(rb_method_type_t, type, VM_METHOD_TYPE_MINIMUM_BITS)
rb_method_definition_struct::alias
rb_method_alias_t alias
Definition: method.h:182
rb_method_definition_struct::bmethod
rb_method_bmethod_t bmethod
Definition: method.h:184
rb_method_definition_struct::original_id
ID original_id
Definition: method.h:189
rb_method_definition_struct::body
union rb_method_definition_struct::@123 body
rb_method_definition_struct::attr
rb_method_attr_t attr
Definition: method.h:181
rb_method_definition_struct::alias_count
int alias_count
Definition: method.h:174
rb_method_definition_struct::optimize_type
enum method_optimized_type optimize_type
Definition: method.h:186
rb_method_definition_struct::cfunc
rb_method_cfunc_t cfunc
Definition: method.h:180
rb_method_definition_struct::refined
rb_method_refined_t refined
Definition: method.h:183
rb_method_definition_struct::method_serial
uintptr_t method_serial
Definition: method.h:190
rb_method_definition_struct::complemented_count
int complemented_count
Definition: method.h:175
rb_method_entry_struct
Definition: method.h:54
rb_method_entry_struct::called_id
ID called_id
Definition: method.h:58
rb_method_entry_struct::flags
VALUE flags
Definition: method.h:55
rb_method_entry_struct::def
struct rb_method_definition_struct *const def
Definition: method.h:57
rb_method_entry_struct::defined_class
VALUE defined_class
Definition: method.h:56
rb_method_entry_struct::owner
VALUE owner
Definition: method.h:59
rb_method_iseq_struct
Definition: method.h:134
rb_method_iseq_struct::cref
rb_cref_t * cref
class reference, should be marked
Definition: method.h:136
rb_method_iseq_struct::iseqptr
rb_iseq_t * iseqptr
iseq pointer, should be separated from iseqval
Definition: method.h:135
rb_method_refined_struct
Definition: method.h:154
rb_method_refined_struct::owner
VALUE owner
Definition: method.h:156
rb_method_refined_struct::orig_me
struct rb_method_entry_struct * orig_me
Definition: method.h:155
rb_scope_visi_struct
Definition: method.h:38
rb_scope_visi_struct::module_func
unsigned int module_func
Definition: method.h:40
rb_scope_visi_struct::BITFIELD
BITFIELD(rb_method_visibility_t, method_visi, 3)
VALUE
unsigned long VALUE
Definition: value.h:38
ID
unsigned long ID
Definition: value.h:39
VM_ASSERT
#define VM_ASSERT(expr)
Definition: vm_core.h:61
uintptr_t
unsigned int uintptr_t
Definition: win32.h:106
def
int def(FILE *source, FILE *dest, int level)
Definition: zpipe.c:36