ruby-changes:13026
From: ko1 <ko1@a...>
Date: Sun, 6 Sep 2009 18:16:39 +0900 (JST)
Subject: [ruby-changes:13026] Ruby:r24771 (trunk): * vm_insnhelper.h (CALL_SIMPLE_METHOD_IC): make a macro
ko1 2009-09-06 18:16:23 +0900 (Sun, 06 Sep 2009) New Revision: 24771 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24771 Log: * vm_insnhelper.h (CALL_SIMPLE_METHOD_IC): make a macro invoke simple method with inline cache entry. * insns.def (opt_length, opt_size): fix to use inline method cache. Modified files: trunk/ChangeLog trunk/insns.def trunk/vm_insnhelper.h Index: ChangeLog =================================================================== --- ChangeLog (revision 24770) +++ ChangeLog (revision 24771) @@ -1,3 +1,10 @@ +Sun Sep 6 18:13:54 2009 Koichi Sasada <ko1@a...> + + * vm_insnhelper.h (CALL_SIMPLE_METHOD_IC): make a macro + invoke simple method with inline cache entry. + + * insns.def (opt_length, opt_size): fix to use inline method cache. + Sun Sep 6 17:47:21 2009 Koichi Sasada <ko1@a...> * template/id.h.tmpl: fix this. Index: insns.def =================================================================== --- insns.def (revision 24770) +++ insns.def (revision 24771) @@ -1917,7 +1917,7 @@ */ DEFINE_INSN opt_length -() +(IC ic) (VALUE recv) (VALUE val) { @@ -1939,7 +1939,7 @@ else { INSN_LABEL(normal_dispatch): PUSH(recv); - CALL_SIMPLE_METHOD(0, idLength, recv); + CALL_SIMPLE_METHOD_IC(0, idLength, recv, ic); } } @@ -1950,7 +1950,7 @@ */ DEFINE_INSN opt_size -() +(IC ic) (VALUE recv) (VALUE val) { @@ -1972,7 +1972,7 @@ else { INSN_LABEL(normal_dispatch): PUSH(recv); - CALL_SIMPLE_METHOD(0, idSize, recv); + CALL_SIMPLE_METHOD_IC(0, idSize, recv, ic); } } Index: vm_insnhelper.h =================================================================== --- vm_insnhelper.h (revision 24770) +++ vm_insnhelper.h (revision 24771) @@ -189,4 +189,9 @@ CALL_METHOD(num, 0, 0, id, rb_method_entry(klass, id), recv); \ } while (0) +#define CALL_SIMPLE_METHOD_IC(num, id, recv, ic) do { \ + VALUE klass = CLASS_OF(recv); \ + CALL_METHOD(num, 0, 0, id, vm_method_search(id, klass, ic), recv); \ +} while (0) + #endif /* RUBY_INSNHELPER_H */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/