aboutsummaryrefslogtreecommitdiffstats
path: root/method.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-03 22:27:51 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-03 22:27:51 +0000
commitffa44cfe416178217fc5b345dcc551d7c2313f34 (patch)
treec399c77a5b8318be4521dbf0033214fcbed0d601 /method.h
parent4056e6adde5b0623c602e5ddc5e34d5b5db11235 (diff)
downloadruby-ffa44cfe416178217fc5b345dcc551d7c2313f34.tar.gz
* method.h: introduce rb_method_refined_t for refined method entry.
* class.c (move_refined_method): catch up this fix. * gc.c (mark_method_entry): ditto. * vm_eval.c (vm_call0_body): ditto. * vm_insnhelper.c (vm_call_method): ditto. * vm_method.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'method.h')
-rw-r--r--method.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/method.h b/method.h
index 16c20dc345..4d420e9cdb 100644
--- a/method.h
+++ b/method.h
@@ -77,6 +77,10 @@ typedef struct rb_method_alias_struct {
const struct rb_method_entry_struct *original_me; /* original_me->klass is original owner */
} rb_method_alias_t;
+typedef struct rb_method_refined_struct {
+ struct rb_method_entry_struct *orig_me;
+} rb_method_refined_t;
+
typedef struct rb_method_definition_struct {
struct {
rb_method_visibility_t visi: 3;
@@ -90,6 +94,8 @@ typedef struct rb_method_definition_struct {
rb_method_cfunc_t cfunc;
rb_method_attr_t attr;
rb_method_alias_t alias;
+ rb_method_refined_t refined;
+
const VALUE proc; /* should be marked */
enum method_optimized_type {
OPTIMIZED_METHOD_TYPE_SEND,
@@ -97,7 +103,6 @@ typedef struct rb_method_definition_struct {
OPTIMIZED_METHOD_TYPE__MAX
} optimize_type;
- struct rb_method_entry_struct *orig_me;
} body;
int *alias_count_ptr;
@@ -107,7 +112,7 @@ typedef struct rb_method_definition_struct {
#define UNDEFINED_METHOD_ENTRY_P(me) (!(me) || !(me)->def || (me)->def->type == VM_METHOD_TYPE_UNDEF)
#define UNDEFINED_REFINED_METHOD_P(def) \
((def)->type == VM_METHOD_TYPE_REFINED && \
- UNDEFINED_METHOD_ENTRY_P((def)->body.orig_me))
+ UNDEFINED_METHOD_ENTRY_P((def)->body.refined.orig_me))
void rb_add_method_cfunc(VALUE klass, ID mid, VALUE (*func)(ANYARGS), int argc, rb_method_visibility_t visi);
void rb_add_method_iseq(VALUE klass, ID mid, VALUE iseqval, rb_cref_t *cref, rb_method_visibility_t visi);