зеркало из https://github.com/github/ruby.git
* vm_core.h, vm_insnhelper.c (vm_call_method): revive
VM_CALL_OPT_SEND_BIT and use it to recognize "send" method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
8c0e6223f2
Коммит
07de51fc4f
|
@ -1,3 +1,8 @@
|
|||
Wed Jul 29 03:34:46 2009 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* vm_core.h, vm_insnhelper.c (vm_call_method): revive
|
||||
VM_CALL_OPT_SEND_BIT and use it to recognize "send" method.
|
||||
|
||||
Wed Jul 29 03:11:59 2009 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* proc.c (rb_method_entry_arity): support not_implemented method.
|
||||
|
|
|
@ -500,6 +500,7 @@ typedef struct {
|
|||
#define VM_CALL_TAILCALL_BIT (0x01 << 5)
|
||||
#define VM_CALL_TAILRECURSION_BIT (0x01 << 6)
|
||||
#define VM_CALL_SUPER_BIT (0x01 << 7)
|
||||
#define VM_CALL_OPT_SEND_BIT (0x01 << 8)
|
||||
|
||||
#define VM_SPECIAL_OBJECT_VMCORE 0x01
|
||||
#define VM_SPECIAL_OBJECT_CBASE 0x02
|
||||
|
|
|
@ -496,7 +496,6 @@ vm_call_method(rb_thread_t *th, rb_control_frame_t *cfp,
|
|||
ID id, const rb_method_entry_t *me, VALUE recv)
|
||||
{
|
||||
VALUE val;
|
||||
int opt_send = 0;
|
||||
|
||||
start_method_dispatch:
|
||||
|
||||
|
@ -567,8 +566,7 @@ vm_call_method(rb_thread_t *th, rb_control_frame_t *cfp,
|
|||
me = rb_method_entry(CLASS_OF(recv), id);
|
||||
num -= 1;
|
||||
DEC_SP(1);
|
||||
flag |= VM_CALL_FCALL_BIT;
|
||||
opt_send = 1;
|
||||
flag |= VM_CALL_FCALL_BIT | VM_CALL_OPT_SEND_BIT;
|
||||
|
||||
goto start_method_dispatch;
|
||||
}
|
||||
|
@ -607,7 +605,7 @@ vm_call_method(rb_thread_t *th, rb_control_frame_t *cfp,
|
|||
}
|
||||
val = vm_method_missing(th, id, recv, num, blockptr, stat);
|
||||
}
|
||||
else if (!opt_send && (me->flag & NOEX_MASK) & NOEX_PROTECTED) {
|
||||
else if (!(flag & VM_CALL_OPT_SEND_BIT) && (me->flag & NOEX_MASK) & NOEX_PROTECTED) {
|
||||
VALUE defined_class = me->klass;
|
||||
|
||||
if (TYPE(defined_class) == T_ICLASS) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче