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

ruby-changes:26677

From: ko1 <ko1@a...>
Date: Mon, 7 Jan 2013 17:38:45 +0900 (JST)
Subject: [ruby-changes:26677] ko1:r38728 (trunk): * include/ruby/ruby.h (RUBY_EVENT_SPECIFIED_LINE): make it special.

ko1	2013-01-07 17:38:25 +0900 (Mon, 07 Jan 2013)

  New Revision: 38728

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

  Log:
    * include/ruby/ruby.h (RUBY_EVENT_SPECIFIED_LINE): make it special.
      This flag is not contained by RUBY_EVENT_TRACEPOINT_ALL.
      This event is experimental one. It is possible to remove/rename
      flag name after 2.0.1.
    * vm_trace.c (get_event_id): return :line if SPECIFIED_LINE was
      occurred. `:specified_line' never been returned.

  Modified files:
    trunk/ChangeLog
    trunk/include/ruby/ruby.h
    trunk/vm_trace.c

Index: include/ruby/ruby.h
===================================================================
--- include/ruby/ruby.h	(revision 38727)
+++ include/ruby/ruby.h	(revision 38728)
@@ -1568,6 +1568,7 @@ static char *dln_libs_to_be_linked[] = { https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L1568
 #define HAVE_NATIVETHREAD
 int ruby_native_thread_p(void);
 
+/* traditional set_trace_func events */
 #define RUBY_EVENT_NONE      0x0000
 #define RUBY_EVENT_LINE      0x0001
 #define RUBY_EVENT_CLASS     0x0002
@@ -1578,17 +1579,19 @@ int ruby_native_thread_p(void); https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L1579
 #define RUBY_EVENT_C_RETURN  0x0040
 #define RUBY_EVENT_RAISE     0x0080
 #define RUBY_EVENT_ALL       0x00ff
-#define RUBY_EVENT_SWITCH   0x20000
-#define RUBY_EVENT_COVERAGE 0x40000
 
 /* for TracePoint extended events */
 #define RUBY_EVENT_B_CALL          0x0100
 #define RUBY_EVENT_B_RETURN        0x0200
 #define RUBY_EVENT_THREAD_BEGIN    0x0400
 #define RUBY_EVENT_THREAD_END      0x0800
-#define RUBY_EVENT_SPECIFIED_LINE  0x8000
 #define RUBY_EVENT_TRACEPOINT_ALL  0xFFFF
 
+/* special events */
+#define RUBY_EVENT_SPECIFIED_LINE 0x10000
+#define RUBY_EVENT_SWITCH         0x20000
+#define RUBY_EVENT_COVERAGE       0x40000
+
 typedef unsigned long rb_event_flag_t;
 typedef void (*rb_event_hook_func_t)(rb_event_flag_t evflag, VALUE data, VALUE self, ID mid, VALUE klass);
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 38727)
+++ ChangeLog	(revision 38728)
@@ -1,3 +1,13 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Jan  7 17:34:22 2013  Koichi Sasada  <ko1@a...>
+
+	* include/ruby/ruby.h (RUBY_EVENT_SPECIFIED_LINE): make it special.
+	  This flag is not contained by RUBY_EVENT_TRACEPOINT_ALL.
+	  This event is experimental one. It is possible to remove/rename
+	  flag name after 2.0.1.
+
+	* vm_trace.c (get_event_id): return :line if SPECIFIED_LINE was
+	  occurred. `:specified_line' never been returned.
+
 Mon Jan  7 15:42:10 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* parse.y (f_kwrest): allow bare kwrest_mark as valid syntax.  its
Index: vm_trace.c
===================================================================
--- vm_trace.c	(revision 38727)
+++ vm_trace.c	(revision 38728)
@@ -546,6 +546,7 @@ get_event_id(rb_event_flag_t event) https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L546
 	C(thread_begin, THREAD_BEGIN);
 	C(thread_end, THREAD_END);
 	C(specified_line, SPECIFIED_LINE);
+      case RUBY_EVENT_LINE | RUBY_EVENT_SPECIFIED_LINE: CONST_ID(id, "line"); return id;
 #undef C
       default:
 	return 0;

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

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