diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-02-17 08:05:42 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-02-17 08:05:42 +0000 |
commit | 50c8982ea8e4c25e154084af1864617e7bd330ae (patch) | |
tree | 071831508382acf23781c696922136d7e1240bce | |
parent | 711ed72b7967b6dc9cc0375a4e331aa24f7b2c0f (diff) | |
download | ruby-50c8982ea8e4c25e154084af1864617e7bd330ae.tar.gz |
* 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-- | ChangeLog | 6 | ||||
-rw-r--r-- | vm.c | 2 | ||||
-rw-r--r-- | vm_eval.c | 6 | ||||
-rw-r--r-- | vm_insnhelper.c | 1 |
4 files changed, 13 insertions, 2 deletions
@@ -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 @@ -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 */ @@ -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; |