diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-11-13 06:24:06 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-11-13 06:24:06 +0000 |
commit | 65cb92fca34538ce3cb39ac91f9421674c57dfc5 (patch) | |
tree | f7053fe08d0ec01d9e30093b6f178a1dc7c3d7c6 /compile.c | |
parent | 69c1181a9f4ff295b3bcdb465979323533b50f65 (diff) | |
download | ruby-65cb92fca34538ce3cb39ac91f9421674c57dfc5.tar.gz |
* compile.c (iseq_specialized_instruction): check argc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -1482,13 +1482,15 @@ iseq_specialized_instruction(rb_iseq_t *iseq, INSN *iobj) } } - if (mid == idSend || mid == id__send || - mid == idSendBang || - mid == id__send__ ) { - OPERAND_AT(iobj, 3) |= INT2FIX(VM_CALL_SEND_BIT); - } - if (mid == idSendBang) { - OPERAND_AT(iobj, 3) |= INT2FIX(VM_CALL_SEND_BANG_BIT); + if (argc > 0) { + if (mid == idSend || mid == id__send || + mid == idSendBang || + mid == id__send__ ) { + OPERAND_AT(iobj, 3) |= INT2FIX(VM_CALL_SEND_BIT); + } + if (mid == idSendBang) { + OPERAND_AT(iobj, 3) |= INT2FIX(VM_CALL_SEND_BANG_BIT); + } } } return COMPILE_OK; |