summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-31 16:14:38 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-31 16:14:38 +0000
commite9f0bb6e341346e948d495dcce2b87ec709e4b42 (patch)
treefa97905cff634b17ccf78d231cd1e8175c53eb02
parent34b8faa2c6c8bc7f41f9f496323b81f2f5390399 (diff)
downloadruby-e9f0bb6e341346e948d495dcce2b87ec709e4b42.tar.gz
ruby-e9f0bb6e341346e948d495dcce2b87ec709e4b42.tar.xz
ruby-e9f0bb6e341346e948d495dcce2b87ec709e4b42.zip
* enum.c (enum_count): remove optimization using #size.
revert r25560. * vm_eval.c (rb_funcall_no_recursive): remove method. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--enum.c6
-rw-r--r--vm_eval.c18
3 files changed, 10 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index 392101808..b2a8eaa66 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sat Oct 31 23:44:35 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * enum.c (enum_count): remove optimization using #size.
+ revert r25560.
+
+ * vm_eval.c (rb_funcall_no_recursive): remove method.
+
Sat Oct 31 23:28:49 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
* vm_eval.c (check_funcall): logic updated according to
diff --git a/enum.c b/enum.c
index aa3a9b7af..53e532fc3 100644
--- a/enum.c
+++ b/enum.c
@@ -119,8 +119,6 @@ count_all_i(VALUE i, VALUE memop, int argc, VALUE *argv)
return Qnil;
}
-extern VALUE rb_funcall_no_recursive(VALUE, ID, int, VALUE*, VALUE (*)());
-
/*
* call-seq:
* enum.count => int
@@ -151,10 +149,6 @@ enum_count(int argc, VALUE *argv, VALUE obj)
func = count_iter_i;
}
else {
- VALUE tmp;
-
- tmp = rb_funcall_no_recursive(obj, id_size, 0, 0, enum_count);
- if (tmp != Qundef) return tmp;
func = count_all_i;
}
}
diff --git a/vm_eval.c b/vm_eval.c
index f5b36e3d8..b413c49d4 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -263,8 +263,9 @@ check_funcall_failed(struct rescue_funcall_args *args, VALUE e)
}
static VALUE
-check_funcall(rb_method_entry_t *me, VALUE recv, ID mid, int argc, VALUE *argv)
+check_funcall(VALUE recv, ID mid, int argc, VALUE *argv)
{
+ rb_method_entry_t *me = rb_search_method_entry(recv, mid);
rb_thread_t *th = GET_THREAD();
int call_status = rb_method_call_status(th, me, CALL_FCALL, Qundef);
@@ -291,20 +292,7 @@ check_funcall(rb_method_entry_t *me, VALUE recv, ID mid, int argc, VALUE *argv)
VALUE
rb_check_funcall(VALUE recv, ID mid, int argc, VALUE *argv)
{
- return check_funcall(rb_search_method_entry(recv, mid), recv, mid, argc, argv);
-}
-
-VALUE
-rb_funcall_no_recursive(VALUE recv, ID mid, int argc, VALUE *argv, VALUE (*func)())
-{
- rb_method_entry_t *me = rb_search_method_entry(recv, mid);
- int call_status;
-
- if (!me) return Qundef;
- if (me->def && me->def->type == VM_METHOD_TYPE_CFUNC &&
- me->def->body.cfunc.func == func)
- return Qundef;
- return check_funcall(me, recv, mid, argc, argv);
+ return check_funcall(recv, mid, argc, argv);
}
static inline rb_method_entry_t *