From 2725f1eb4ceb3a1aba0654c58ebfbb8adef7a9f3 Mon Sep 17 00:00:00 2001 From: ko1 Date: Sat, 6 Jan 2007 00:24:59 +0000 Subject: * insns.def : support direct method dispatch with "send" or "funcall". This means that "obj.send :m" skips "BasicObject#send" invocation (method frame creation, etc) and "obj.m" invokes directly. If you make backtrace, there are no enties of "send" method. * compile.c (iseq_specialized_instruction) : fix to support above * eval.c : ditto (remove "static" from rb_f_send and rb_f_funcall * yarvcore.c : ditto (add a external IDs for compiler) * yarvcore.h : ditto (add a VM_CALL_SEND_BIT macro) * yarvtest/test_method.rb : add tests for above changes * eval.c : remove unused "Kernel#send" declaration git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- compile.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'compile.c') diff --git a/compile.c b/compile.c index 198a4c21d..0233bd236 100644 --- a/compile.c +++ b/compile.c @@ -1671,6 +1671,11 @@ iseq_specialized_instruction(yarv_iseq_t *iseq, INSN *iobj) } } } + + if (mid == idSend || mid == id__send__ || mid == id__send || + mid == idFuncall || mid == id__send_bang) { + OPERAND_AT(iobj, 3) |= INT2FIX(VM_CALL_SEND_BIT); + } } return COMPILE_OK; } -- cgit