ruby-changes:12960
From: yugui <ko1@a...>
Date: Sat, 29 Aug 2009 20:46:18 +0900 (JST)
Subject: [ruby-changes:12960] Ruby:r24702 (trunk): * vm_eval.c (rb_call0): gets rid of checking method cache twice.
yugui 2009-08-29 20:42:53 +0900 (Sat, 29 Aug 2009) New Revision: 24702 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24702 Log: * vm_eval.c (rb_call0): gets rid of checking method cache twice. * method.h (rb_get_method_entry): added a prototype of the function. (rb_method_entry_without_cache): more friendly name. Modified files: trunk/ChangeLog trunk/method.h trunk/vm_eval.c Index: method.h =================================================================== --- method.h (revision 24701) +++ method.h (revision 24702) @@ -78,6 +78,8 @@ rb_method_entry_t *rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *option, rb_method_flag_t noex); rb_method_entry_t *rb_add_method_me(VALUE klass, ID mid, const rb_method_entry_t *, rb_method_flag_t noex); rb_method_entry_t *rb_method_entry(VALUE klass, ID id); +rb_method_entry_t *rb_get_method_entry(VALUE klass, ID id); +#define rb_method_entry_without_cache(klass, id) rb_get_method_entry((klass), (id)) int rb_method_entry_arity(const rb_method_entry_t *me); void rb_gc_mark_method_entry(const rb_method_entry_t *me); void rb_free_method_entry(rb_method_entry_t *me); Index: ChangeLog =================================================================== --- ChangeLog (revision 24701) +++ ChangeLog (revision 24702) @@ -1,3 +1,10 @@ +Sat Aug 29 20:40:02 2009 Yuki Sonoda (Yugui) <yugui@y...> + + * vm_eval.c (rb_call0): gets rid of checking method cache twice. + + * method.h (rb_get_method_entry): added a prototype of the function. + (rb_method_entry_without_cache): more friendly name. + Sat Aug 29 12:16:47 2009 Nobuyoshi Nakada <nobu@r...> * lib/tmpdir.rb (Dir.mktmpdir): rolled back r24699. [ruby-dev:39193] Index: vm_eval.c =================================================================== --- vm_eval.c (revision 24701) +++ vm_eval.c (revision 24702) @@ -222,7 +222,7 @@ } klass = me->klass; } - else if ((me = rb_method_entry(klass, mid)) != 0 && me->def) { + else if ((me = rb_method_entry_without_cache(klass, mid)) != 0 && me->def) { klass = me->klass; } else { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/