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 66 #define METHOD_ENTRY_VISI(me) (rb_method_visibility_t)(((me)->flags & (IMEMO_FL_USER0 | IMEMO_FL_USER1)) >> (IMEMO_FL_USHIFT+0)) 67 #define METHOD_ENTRY_BASIC(me) (int) (((me)->flags & (IMEMO_FL_USER2 )) >> (IMEMO_FL_USHIFT+2)) 68 #define METHOD_ENTRY_COMPLEMENTED(me) ((me)->flags & IMEMO_FL_USER3) 69 #define METHOD_ENTRY_COMPLEMENTED_SET(me) ((me)->flags = (me)->flags | IMEMO_FL_USER3) 119 #define rb_iseq_t rb_iseq_t 160 enum method_optimized_type {
164 OPTIMIZED_METHOD_TYPE__MAX
171 #define UNDEFINED_METHOD_ENTRY_P(me) (!(me) || !(me)->def || (me)->def->type == VM_METHOD_TYPE_UNDEF) 172 #define UNDEFINED_REFINED_METHOD_P(def) \ 173 ((def)->type == VM_METHOD_TYPE_REFINED && \ 174 UNDEFINED_METHOD_ENTRY_P((def)->body.refined.orig_me))
rb_method_entry_t * rb_method_entry_set(VALUE klass, ID mid, const rb_method_entry_t *, rb_method_visibility_t noex)
const rb_callable_method_entry_t * rb_callable_method_entry_with_refinements(VALUE klass, ID id)
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)
static unsigned int hash(str, len) register const char *str
static void METHOD_ENTRY_BASIC_SET(rb_method_entry_t *me, unsigned int basic)
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
SSL_METHOD *(* func)(void)
rb_method_entry_t * rb_method_entry_create(ID called_id, VALUE klass, rb_method_visibility_t visi, const rb_method_definition_t *def)
static void METHOD_ENTRY_VISI_SET(rb_method_entry_t *me, rb_method_visibility_t visi)
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
struct rb_method_refined_struct rb_method_refined_t
struct rb_method_definition_struct rb_method_definition_t
int rb_method_entry_eq(const rb_method_entry_t *m1, const rb_method_entry_t *m2)
static void METHOD_ENTRY_FLAGS_COPY(rb_method_entry_t *dst, const rb_method_entry_t *src)
const rb_scope_visibility_t scope_visi
struct rb_cref_struct rb_cref_t
struct rb_cref_struct *const next
void rb_method_entry_copy(rb_method_entry_t *dst, const rb_method_entry_t *src)
static void METHOD_ENTRY_FLAGS_SET(rb_method_entry_t *me, rb_method_visibility_t visi, unsigned int basic)
struct rb_method_definition_struct *const def
void rb_free_method_entry(const rb_method_entry_t *me)
const rb_method_entry_t * rb_method_entry_with_refinements(VALUE klass, ID id)
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)
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)
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)
struct rb_method_cfunc_struct rb_method_cfunc_t
const rb_callable_method_entry_t * rb_callable_method_entry_without_refinements(VALUE klass, ID id)
#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)
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
const struct rb_method_entry_struct *const orig_me
rb_method_refined_t refined
const rb_method_entry_t * rb_method_entry_without_refinements(VALUE klass, ID id)
VALUE rb_obj_method_location(VALUE obj, ID id)