From ce55b4c0e0062cd59eb3d5e05ffc5d75bdcde85a 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@11488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- yarvcore.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'yarvcore.c') diff --git a/yarvcore.c b/yarvcore.c index d6b59c527d..3b510495e6 100644 --- a/yarvcore.c +++ b/yarvcore.c @@ -59,6 +59,11 @@ ID idEnd; ID idBitblt; ID idAnswer; ID idSvarPlaceholder; +ID idSend; +ID id__send__; +ID id__send; +ID idFuncall; +ID id__send_bang; unsigned long yarvGlobalStateVersion = 1; @@ -996,6 +1001,12 @@ Init_yarvcore(void) idAnswer = rb_intern("the_answer_to_life_the_universe_and_everything"); idSvarPlaceholder = rb_intern("#svar"); + idSend = rb_intern("send"); + id__send__ = rb_intern("__send__"); + id__send = rb_intern("__send"); + idFuncall = rb_intern("funcall"); + id__send_bang = rb_intern("__send!"); + #if TEST_AOT_COMPILE Init_compiled(); #endif -- cgit v1.2.3