[前][次][番号順一覧][スレッド一覧]

ruby-changes:14631

From: yugui <ko1@a...>
Date: Sat, 30 Jan 2010 21:45:30 +0900 (JST)
Subject: [ruby-changes:14631] Ruby:r26476 (ruby_1_9_1): merges r25266 from trunk into ruby_1_9_1.

yugui	2010-01-30 21:45:14 +0900 (Sat, 30 Jan 2010)

  New Revision: 26476

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26476

  Log:
    merges r25266 from trunk into ruby_1_9_1.
    --
    * compile.c (ADD_TRACE): fire coverage event in ensure clause.
      [ruby-dev:39303]
    
    * iseq.h, iseq.c: ditto.

  Modified files:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/compile.c
    branches/ruby_1_9_1/iseq.c
    branches/ruby_1_9_1/iseq.h
    branches/ruby_1_9_1/version.h

Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 26475)
+++ ruby_1_9_1/ChangeLog	(revision 26476)
@@ -1,3 +1,10 @@
+Fri Oct  9 01:07:34 2009  Yusuke Endoh  <mame@t...>
+
+	* compile.c (ADD_TRACE): fire coverage event in ensure clause.
+	  [ruby-dev:39303]
+
+	* iseq.h, iseq.c: ditto.
+
 Fri Oct  9 00:33:29 2009  Marc-Andre Lafortune  <ruby-core@m...>
 
 	* lib/net/telnet.rb (cmd): Pass FailEOF options: patch by Brian
Index: ruby_1_9_1/iseq.c
===================================================================
--- ruby_1_9_1/iseq.c	(revision 26475)
+++ ruby_1_9_1/iseq.c	(revision 26476)
@@ -191,6 +191,7 @@
     iseq->compile_data->storage_head->buff =
       (char *)(&iseq->compile_data->storage_head->buff + 1);
     iseq->compile_data->option = option;
+    iseq->compile_data->last_coverable_line = -1;
 
     set_relation(iseq, parent);
 
Index: ruby_1_9_1/iseq.h
===================================================================
--- ruby_1_9_1/iseq.h	(revision 26475)
+++ ruby_1_9_1/iseq.h	(revision 26476)
@@ -82,6 +82,7 @@
     struct iseq_compile_data_storage *storage_head;
     struct iseq_compile_data_storage *storage_current;
     int last_line;
+    int last_coverable_line;
     int flip_cnt;
     int label_no;
     int node_level;
Index: ruby_1_9_1/compile.c
===================================================================
--- ruby_1_9_1/compile.c	(revision 26475)
+++ ruby_1_9_1/compile.c	(revision 26476)
@@ -219,8 +219,9 @@
 #define ADD_TRACE(seq, line, event) \
   do { \
       if ((event) == RUBY_EVENT_LINE && iseq->coverage && \
-	  RARRAY_PTR(iseq->coverage)[(line) - 1] == Qnil) { \
+	  (line) != iseq->compile_data->last_coverable_line) { \
 	  RARRAY_PTR(iseq->coverage)[(line) - 1] = INT2FIX(0); \
+	  iseq->compile_data->last_coverable_line = (line); \
 	  ADD_INSN1(seq, line, trace, INT2FIX(RUBY_EVENT_COVERAGE)); \
       } \
       if (iseq->compile_data->option->trace_instruction) { \
Index: ruby_1_9_1/version.h
===================================================================
--- ruby_1_9_1/version.h	(revision 26475)
+++ ruby_1_9_1/version.h	(revision 26476)
@@ -1,5 +1,5 @@
 #define RUBY_VERSION "1.9.1"
-#define RUBY_PATCHLEVEL 381
+#define RUBY_PATCHLEVEL 382
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 9
 #define RUBY_VERSION_TEENY 1

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]