summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-17 08:05:42 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-17 08:05:42 +0000
commit50c8982ea8e4c25e154084af1864617e7bd330ae (patch)
tree071831508382acf23781c696922136d7e1240bce
parent711ed72b7967b6dc9cc0375a4e331aa24f7b2c0f (diff)
* vm_insnhelper.c (vm_call_cfunc): removed unused variable.
* vm.c (vm_frametype_name): define only when VMDEBUG. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--vm.c2
-rw-r--r--vm_eval.c6
-rw-r--r--vm_insnhelper.c1
4 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 8041ca94c3f..cf99bf708af 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Feb 17 17:05:39 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * vm_insnhelper.c (vm_call_cfunc): removed unused variable.
+
+ * vm.c (vm_frametype_name): define only when VMDEBUG.
+
Wed Feb 17 15:34:45 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/dl/dl_conversions.c (rb_dl_type_to_ffi_type): support signed
diff --git a/vm.c b/vm.c
index fc58d07c6dd..6cfea72e33c 100644
--- a/vm.c
+++ b/vm.c
@@ -987,6 +987,7 @@ vm_init_redefined_flag(void)
/* for vm development */
+#if VMDEBUG
static const char *
vm_frametype_name(const rb_control_frame_t *cfp)
{
@@ -1005,6 +1006,7 @@ vm_frametype_name(const rb_control_frame_t *cfp)
rb_bug("unknown frame");
}
}
+#endif
/* evaluator body */
diff --git a/vm_eval.c b/vm_eval.c
index ada783da8d1..2e011c7b7e6 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -814,8 +814,10 @@ rb_f_loop(VALUE self)
return Qnil; /* dummy */
}
+#if VMDEBUG
static const char *
vm_frametype_name(const rb_control_frame_t *cfp);
+#endif
VALUE
rb_iterate(VALUE (* it_proc) (VALUE), VALUE data1,
@@ -858,7 +860,9 @@ rb_iterate(VALUE (* it_proc) (VALUE), VALUE data1,
/* check skipped frame */
while (th->cfp != cfp) {
- /* printf("skipped frame: %s\n", vm_frametype_name(th->cfp)); */
+#if VMDEBUG
+ printf("skipped frame: %s\n", vm_frametype_name(th->cfp));
+#endif
if (UNLIKELY(VM_FRAME_TYPE(th->cfp) == VM_FRAME_MAGIC_CFUNC)) {
const rb_method_entry_t *me = th->cfp->me;
EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, th->cfp->self, me->called_id, me->klass);
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index ae1d86d97b3..23b48506f54 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -364,7 +364,6 @@ vm_call_cfunc(rb_thread_t *th, rb_control_frame_t *reg_cfp,
const rb_method_entry_t *me)
{
VALUE val = 0;
- int state = 0;
const rb_method_definition_t *def = me->def;
rb_control_frame_t *cfp;