diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-05-18 00:32:30 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-05-18 00:32:30 +0000 |
commit | e0e8ee0ac8eb04e44060218af4dc207f3e59eeed (patch) | |
tree | 36ff25e4497a58153e54fd6bbe56ee5c44851e69 | |
parent | bd0cd7f92b7d7856b315bbc0342de8b3e0ad3b5a (diff) |
* eval.c (rb_method_node): search cache entry first.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | eval.c | 6 |
2 files changed, 10 insertions, 0 deletions
@@ -1,3 +1,7 @@ +Tue May 18 09:30:25 2004 SASADA Koichi <ko1@atdot.net> + + * eval.c (rb_method_node): search cache entry first. + Mon May 17 16:04:06 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp> * numeric.c (flo_to_s): p 0.0 should be '0.0' not '0.0e+00'. @@ -452,6 +452,12 @@ rb_method_node(klass, id) ID id; { int noex; + struct cache_entry *ent; + + ent = cache + EXPR1(klass, id); + if (ent->mid == id && ent->klass == klass && ent->method){ + return ent->method; + } return rb_get_method_body(&klass, &id, &noex); } |