summaryrefslogtreecommitdiff
path: root/method.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-06 09:49:53 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-06 09:49:53 (GMT)
commit72cf24c813aa788366ef4a6fc0be0491cdcaaf95 (patch)
tree2d6ed7860828db1dc997109bacd77bc0cb661cba /method.h
parentaa4de7328d3126288282c76a56b49a544de5e9a3 (diff)
* method.h: remove METHOD_ENTRY_SAFE(me) and related code
because $SAFE = 3 and 4 is not available. Now, $SAFE is not checked on method dispatch at all. * vm_eval.c, vm_insnhelper.c, vm_method.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'method.h')
-rw-r--r--method.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/method.h b/method.h
index 69643c1..1f72b92 100644
--- a/method.h
+++ b/method.h
@@ -63,7 +63,6 @@ typedef struct rb_callable_method_entry_struct { /* same fields with rb_method_e
#define METHOD_ENTRY_VISI(me) (rb_method_visibility_t)(((me)->flags & (IMEMO_FL_USER0 | IMEMO_FL_USER1)) >> (IMEMO_FL_USHIFT+0))
#define METHOD_ENTRY_BASIC(me) (int) (((me)->flags & (IMEMO_FL_USER2 )) >> (IMEMO_FL_USHIFT+2))
-#define METHOD_ENTRY_SAFE(me) (int) (((me)->flags & (IMEMO_FL_USER3 | IMEMO_FL_USER4)) >> (IMEMO_FL_USHIFT+3))
static inline void
METHOD_ENTRY_VISI_SET(rb_method_entry_t *me, rb_method_visibility_t visi)
@@ -78,20 +77,13 @@ METHOD_ENTRY_BASIC_SET(rb_method_entry_t *me, unsigned int basic)
me->flags = (me->flags & ~(IMEMO_FL_USER2 )) | (basic << IMEMO_FL_USHIFT+2);
}
static inline void
-METHOD_ENTRY_SAFE_SET(rb_method_entry_t *me, unsigned int safe)
-{
- VM_ASSERT(safe <= 1);
- me->flags = (me->flags & ~(IMEMO_FL_USER3 | IMEMO_FL_USER4)) | (safe << IMEMO_FL_USHIFT+3);
-}
-static inline void
-METHOD_ENTRY_FLAGS_SET(rb_method_entry_t *me, rb_method_visibility_t visi, unsigned int basic, unsigned int safe)
+METHOD_ENTRY_FLAGS_SET(rb_method_entry_t *me, rb_method_visibility_t visi, unsigned int basic)
{
VM_ASSERT((int)visi >= 0 && visi <= 3);
VM_ASSERT(basic <= 1);
- VM_ASSERT(safe <= 1);
me->flags =
(me->flags & ~(IMEMO_FL_USER0|IMEMO_FL_USER1|IMEMO_FL_USER2|IMEMO_FL_USER3|IMEMO_FL_USER4)) |
- ((visi << IMEMO_FL_USHIFT+0) | (basic << (IMEMO_FL_USHIFT+2)) | (safe << IMEMO_FL_USHIFT+3));
+ ((visi << IMEMO_FL_USHIFT+0) | (basic << (IMEMO_FL_USHIFT+2)));
}
static inline void
METHOD_ENTRY_FLAGS_COPY(rb_method_entry_t *dst, const rb_method_entry_t *src)