* insnhelper.ci (vm_call_method): allow send! to call protected
methods as well. [ruby-core:12280] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fbebfdf23d
commit
ac835db6c8
@ -1,3 +1,8 @@
|
|||||||
|
Fri Sep 28 23:15:31 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* insnhelper.ci (vm_call_method): allow send! to call protected
|
||||||
|
methods as well. [ruby-core:12280]
|
||||||
|
|
||||||
Fri Sep 28 22:33:47 2007 Koichi Sasada <ko1@atdot.net>
|
Fri Sep 28 22:33:47 2007 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* benchmark/bm_so_fasta.rb: added.
|
* benchmark/bm_so_fasta.rb: added.
|
||||||
|
@ -1487,6 +1487,9 @@ iseq_specialized_instruction(rb_iseq_t *iseq, INSN *iobj)
|
|||||||
mid == id__send__ ) {
|
mid == id__send__ ) {
|
||||||
OPERAND_AT(iobj, 3) |= INT2FIX(VM_CALL_SEND_BIT);
|
OPERAND_AT(iobj, 3) |= INT2FIX(VM_CALL_SEND_BIT);
|
||||||
}
|
}
|
||||||
|
if (mid == idSendBang || mid == id__send_bang) {
|
||||||
|
OPERAND_AT(iobj, 3) |= INT2FIX(VM_CALL_SEND_BANG_BIT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return COMPILE_OK;
|
return COMPILE_OK;
|
||||||
}
|
}
|
||||||
|
@ -537,7 +537,8 @@ vm_call_method(rb_thread_t *th, rb_control_frame_t *cfp,
|
|||||||
}
|
}
|
||||||
val = vm_method_missing(th, id, recv, num, blockptr, stat);
|
val = vm_method_missing(th, id, recv, num, blockptr, stat);
|
||||||
}
|
}
|
||||||
else if ((mn->nd_noex & NOEX_MASK) & NOEX_PROTECTED) {
|
else if (((mn->nd_noex & NOEX_MASK) & NOEX_PROTECTED) &&
|
||||||
|
!(flag & VM_CALL_SEND_BANG_BIT)) {
|
||||||
VALUE defined_class = mn->nd_clss;
|
VALUE defined_class = mn->nd_clss;
|
||||||
|
|
||||||
if (TYPE(defined_class) == T_ICLASS) {
|
if (TYPE(defined_class) == T_ICLASS) {
|
||||||
|
@ -539,6 +539,7 @@ typedef struct {
|
|||||||
#define VM_CALL_TAILRECURSION_BIT (0x01 << 6)
|
#define VM_CALL_TAILRECURSION_BIT (0x01 << 6)
|
||||||
#define VM_CALL_SUPER_BIT (0x01 << 7)
|
#define VM_CALL_SUPER_BIT (0x01 << 7)
|
||||||
#define VM_CALL_SEND_BIT (0x01 << 8)
|
#define VM_CALL_SEND_BIT (0x01 << 8)
|
||||||
|
#define VM_CALL_SEND_BANG_BIT (0x01 << 9)
|
||||||
|
|
||||||
/* inline (method|const) cache */
|
/* inline (method|const) cache */
|
||||||
#define NEW_INLINE_CACHE_ENTRY() NEW_WHILE(Qundef, 0, 0)
|
#define NEW_INLINE_CACHE_ENTRY() NEW_WHILE(Qundef, 0, 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user