ruby-changes:6438
From: ko1 <ko1@a...>
Date: Tue, 8 Jul 2008 13:43:20 +0900 (JST)
Subject: [ruby-changes:6438] Ruby:r17954 (trunk): * compile.h: fix to skip inserting a trace insn.
ko1 2008-07-08 13:43:02 +0900 (Tue, 08 Jul 2008) New Revision: 17954 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=17954 Log: * compile.h: fix to skip inserting a trace insn. Modified files: trunk/ChangeLog trunk/compile.h Index: ChangeLog =================================================================== --- ChangeLog (revision 17953) +++ ChangeLog (revision 17954) @@ -1,3 +1,7 @@ +Tue Jul 8 13:38:22 2008 Koichi Sasada <ko1@a...> + + * compile.h: fix to skip inserting a trace insn. + Tue Jul 8 11:41:17 2008 NAKAMURA Usaku <usa@r...> * dir.c: shoudn't use ruby object in globbing, because glob service Index: compile.h =================================================================== --- compile.h (revision 17953) +++ compile.h (revision 17954) @@ -164,11 +164,14 @@ #define ADD_TRACE(seq, line, event) \ do { \ - if ((event) == RUBY_EVENT_LINE && iseq->coverage && RARRAY_PTR(iseq->coverage)[(line) - 1] == Qnil) { \ + if ((event) == RUBY_EVENT_LINE && iseq->coverage && \ + RARRAY_PTR(iseq->coverage)[(line) - 1] == Qnil) { \ RARRAY_PTR(iseq->coverage)[(line) - 1] = INT2FIX(0); \ ADD_INSN1(seq, line, trace, INT2FIX(RUBY_EVENT_COVERAGE)); \ } \ - ADD_INSN1(seq, line, trace, INT2FIX(event)); \ + if (iseq->compile_data->option->trace_instruction) { \ + ADD_INSN1(seq, line, trace, INT2FIX(event)); \ + } \ }while(0); /* add label */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/