mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
55cfc1e409
commit
f1e98086f2
3 changed files with 16 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
|||
Sun Sep 6 18:13:54 2009 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* 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@atdot.net>
|
||||
|
||||
* template/id.h.tmpl: fix this.
|
||||
|
|
|
@ -1917,7 +1917,7 @@ opt_aset
|
|||
*/
|
||||
DEFINE_INSN
|
||||
opt_length
|
||||
()
|
||||
(IC ic)
|
||||
(VALUE recv)
|
||||
(VALUE val)
|
||||
{
|
||||
|
@ -1939,7 +1939,7 @@ opt_length
|
|||
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 @@ opt_length
|
|||
*/
|
||||
DEFINE_INSN
|
||||
opt_size
|
||||
()
|
||||
(IC ic)
|
||||
(VALUE recv)
|
||||
(VALUE val)
|
||||
{
|
||||
|
@ -1972,7 +1972,7 @@ opt_size
|
|||
else {
|
||||
INSN_LABEL(normal_dispatch):
|
||||
PUSH(recv);
|
||||
CALL_SIMPLE_METHOD(0, idSize, recv);
|
||||
CALL_SIMPLE_METHOD_IC(0, idSize, recv, ic);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -189,4 +189,9 @@ extern VALUE ruby_vm_const_missing_count;
|
|||
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 */
|
||||
|
|
Loading…
Reference in a new issue