diff --git a/ChangeLog b/ChangeLog index 8041ca94c3..cf99bf708a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Feb 17 17:05:39 2010 Nobuyoshi Nakada + + * 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 * ext/dl/dl_conversions.c (rb_dl_type_to_ffi_type): support signed diff --git a/vm.c b/vm.c index fc58d07c6d..6cfea72e33 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 ada783da8d..2e011c7b7e 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 ae1d86d97b..23b48506f5 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;