1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* gc.c (free_method_cache_entry_i): unused function

* gc.c (rb_free_mc_table): ditto

* internal.h (method_cache_entry_t): unused struct

* vm_method.c (verify_method_cache): remove unused variable

* vm_method.c (rb_method_entry): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
charliesome 2013-09-24 05:09:57 +00:00
parent f088828106
commit 4cf9b6694f
4 changed files with 12 additions and 28 deletions

View file

@ -1,3 +1,15 @@
Tue Sep 24 14:07:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
* gc.c (free_method_cache_entry_i): unused function
* gc.c (rb_free_mc_table): ditto
* internal.h (method_cache_entry_t): unused struct
* vm_method.c (verify_method_cache): remove unused variable
* vm_method.c (rb_method_entry): ditto
Tue Sep 24 14:01:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
* class.c (class_alloc): remove mc_tbl

14
gc.c
View file

@ -1121,20 +1121,6 @@ rb_free_m_table(st_table *tbl)
st_free_table(tbl);
}
static int
free_method_cache_entry_i(ID key, method_cache_entry_t *entry, st_data_t data)
{
free(entry);
return ST_CONTINUE;
}
void
rb_free_mc_table(st_table *tbl)
{
st_foreach(tbl, free_method_cache_entry_i, 0);
st_free_table(tbl);
}
static int
free_const_entry_i(ID key, rb_const_entry_t *ce, st_data_t data)
{

View file

@ -252,16 +252,6 @@ typedef uint64_t vm_state_version_t;
typedef unsigned long vm_state_version_t;
#endif
struct rb_method_entry_struct;
typedef struct method_cache_entry {
vm_state_version_t vm_state;
vm_state_version_t seq;
ID mid;
VALUE defined_class;
struct rb_method_entry_struct *me;
} method_cache_entry_t;
struct rb_classext_struct {
VALUE super;
struct st_table *iv_tbl;

View file

@ -565,7 +565,6 @@ static void
verify_method_cache(VALUE klass, ID id, VALUE defined_class, rb_method_entry_t *me)
{
VALUE actual_defined_class;
method_cache_entry_t ent;
rb_method_entry_t *actual_me =
rb_method_entry_get_without_cache(klass, id, &actual_defined_class);
@ -591,9 +590,6 @@ rb_method_entry(VALUE klass, ID id, VALUE *defined_class_ptr)
#endif
return ent->me;
}
#else
method_cache_entry_t ent_;
method_cache_entry_t* ent = &ent_;
#endif
return rb_method_entry_get_without_cache(klass, id, defined_class_ptr);