12 #define RUBY_METHOD_H 1 16 #ifndef END_OF_ENUMERATION 17 # if defined(__GNUC__) &&! defined(__STRICT_ANSI__) 18 # define END_OF_ENUMERATION(key) 20 # define END_OF_ENUMERATION(key) END_OF_##key##_PLACEHOLDER = 0 54 struct rb_method_definition_struct *
const def;
62 struct rb_method_definition_struct *
const def;
67 #define METHOD_ENTRY_VISI(me) (rb_method_visibility_t)(((me)->flags & (IMEMO_FL_USER0 | IMEMO_FL_USER1)) >> (IMEMO_FL_USHIFT+0)) 68 #define METHOD_ENTRY_BASIC(me) (int) (((me)->flags & (IMEMO_FL_USER2 )) >> (IMEMO_FL_USHIFT+2)) 69 #define METHOD_ENTRY_COMPLEMENTED(me) ((me)->flags & IMEMO_FL_USER3) 70 #define METHOD_ENTRY_COMPLEMENTED_SET(me) ((me)->flags = (me)->flags | IMEMO_FL_USER3) 120 #define rb_iseq_t rb_iseq_t 155 unsigned int type : 4;
156 int alias_count : 28;
157 int complemented_count : 28;
175 #define UNDEFINED_METHOD_ENTRY_P(me) (!(me) || !(me)->def || (me)->def->type == VM_METHOD_TYPE_UNDEF) 176 #define UNDEFINED_REFINED_METHOD_P(def) \ 177 ((def)->type == VM_METHOD_TYPE_REFINED && \ 178 UNDEFINED_METHOD_ENTRY_P((def)->body.refined.orig_me))
wrapper for method_missing(id)
rb_method_entry_t * rb_method_entry_set(VALUE klass, ID mid, const rb_method_entry_t *, rb_method_visibility_t noex)
const rb_method_entry_t * rb_method_entry_with_refinements(VALUE klass, ID id, VALUE *defined_class)
struct rb_method_iseq_struct rb_method_iseq_t
const rb_method_entry_t * rb_method_entry_clone(const rb_method_entry_t *me)
void rb_add_method_iseq(VALUE klass, ID mid, const rb_iseq_t *iseq, rb_cref_t *cref, rb_method_visibility_t visi)
rb_cref_t *const cref
class reference, should be marked
struct rb_method_definition_struct rb_method_definition_t
struct rb_method_definition_struct *const def
VALUE rb_mod_method_location(VALUE mod, ID id)
struct rb_method_attr_struct rb_method_attr_t
rb_method_entry_t * rb_method_entry_create(ID called_id, VALUE klass, rb_method_visibility_t visi, const rb_method_definition_t *def)
struct rb_method_alias_struct rb_method_alias_t
void rb_sweep_method_entry(void *vm)
struct rb_method_entry_struct rb_method_entry_t
const rb_callable_method_entry_t * rb_callable_method_entry_without_refinements(VALUE klass, ID id, VALUE *defined_class)
struct rb_method_refined_struct rb_method_refined_t
int rb_method_entry_eq(const rb_method_entry_t *m1, const rb_method_entry_t *m2)
const rb_scope_visibility_t scope_visi
struct rb_cref_struct rb_cref_t
CREF (Class REFerence)
struct rb_cref_struct *const next
void rb_method_entry_copy(rb_method_entry_t *dst, const rb_method_entry_t *src)
const rb_callable_method_entry_t * rb_callable_method_entry_with_refinements(VALUE klass, ID id, VALUE *defined_class)
struct rb_method_definition_struct *const def
void rb_free_method_entry(const rb_method_entry_t *me)
int rb_method_entry_arity(const rb_method_entry_t *me)
const rb_method_entry_t * rb_resolve_refined_method(VALUE refinements, const rb_method_entry_t *me)
const VALUE defined_class
VALUE rb_method_entry_location(const rb_method_entry_t *me)
const rb_callable_method_entry_t * rb_resolve_refined_method_callable(VALUE refinements, const rb_callable_method_entry_t *me)
attr_writer or attr_accessor
void rb_add_method_cfunc(VALUE klass, ID mid, VALUE(*func)(ANYARGS), int argc, rb_method_visibility_t visi)
const rb_callable_method_entry_t * rb_callable_method_entry(VALUE klass, ID id)
const rb_method_entry_t * rb_method_entry(VALUE klass, ID id)
const rb_method_entry_t * rb_method_entry_without_refinements(VALUE klass, ID id, VALUE *defined_class)
st_index_t rb_hash_method_entry(st_index_t hash, const rb_method_entry_t *me)
const VALUE defined_class
rb_method_visibility_t method_visi
const struct rb_method_entry_struct *const original_me
struct rb_callable_method_entry_struct rb_callable_method_entry_t
const rb_method_entry_t * rb_method_entry_at(VALUE obj, ID id)
Kernel::send, Proc::call, etc.
struct rb_method_cfunc_struct rb_method_cfunc_t
#define END_OF_ENUMERATION(key)
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)
PACKED_STRUCT_UNALIGNED(struct rb_method_definition_struct { unsigned int type :4;int alias_count :28;int complemented_count :28;union { rb_method_iseq_t iseq;rb_method_cfunc_t cfunc;rb_method_attr_t attr;rb_method_alias_t alias;rb_method_refined_t refined;const VALUE proc;enum method_optimized_type optimize_type;} body;ID original_id;})
struct rb_scope_visi_struct rb_scope_visibility_t
rb_method_entry_t * rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *option, rb_method_visibility_t visi)
void rb_scope_visibility_set(rb_method_visibility_t)
void rb_add_refined_method_entry(VALUE refined_class, ID mid)
const rb_iseq_t *const iseqptr
iseq pointer, should be separated from iseqval
const struct rb_method_entry_struct *const orig_me
attr_reader or attr_accessor
VALUE rb_obj_method_location(VALUE obj, ID id)