summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcharliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-24 05:09:57 +0000
committercharliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-24 05:09:57 +0000
commit4cf9b6694f12c84a1095a950e1ab6eaafca79c56 (patch)
treee354e39c9ef669d5922a5e702d1f28277cd628a5
parentf088828106254ebb0d07b0385966692c3f938c0c (diff)
* 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
-rw-r--r--ChangeLog12
-rw-r--r--gc.c14
-rw-r--r--internal.h10
-rw-r--r--vm_method.c4
4 files changed, 12 insertions, 28 deletions
diff --git a/ChangeLog b/ChangeLog
index 65273e7..b3d07a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/gc.c b/gc.c
index 8fea531..0a3892f 100644
--- a/gc.c
+++ b/gc.c
@@ -1122,20 +1122,6 @@ rb_free_m_table(st_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)
{
xfree(ce);
diff --git a/internal.h b/internal.h
index 567100c..424f6f5 100644
--- a/internal.h
+++ b/internal.h
@@ -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;
diff --git a/vm_method.c b/vm_method.c
index 606f960..e4ba0e9 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -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);