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

ruby-changes:54143

From: ko1 <ko1@a...>
Date: Thu, 13 Dec 2018 00:45:11 +0900 (JST)
Subject: [ruby-changes:54143] ko1:r66364 (trunk): remove `compiled_` prefix. [Feature #15287]

ko1	2018-12-13 00:45:06 +0900 (Thu, 13 Dec 2018)

  New Revision: 66364

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66364

  Log:
    remove `compiled_` prefix. [Feature #15287]
    
    * vm_trace.c: remove `compiled_` prefix from the following methods:
      * `compiled_eval_script`
      * `compiled_instruction_sequence`
      [Feature #15287]

  Modified files:
    trunk/NEWS
    trunk/test/ruby/test_settracefunc.rb
    trunk/vm_trace.c
Index: vm_trace.c
===================================================================
--- vm_trace.c	(revision 66363)
+++ vm_trace.c	(revision 66364)
@@ -963,7 +963,7 @@ rb_tracearg_raised_exception(rb_trace_ar https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L963
 }
 
 VALUE
-rb_tracearg_compiled_eval_script(rb_trace_arg_t *trace_arg)
+rb_tracearg_eval_script(rb_trace_arg_t *trace_arg)
 {
     VALUE data = trace_arg->data;
 
@@ -987,7 +987,7 @@ rb_tracearg_compiled_eval_script(rb_trac https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L987
 }
 
 VALUE
-rb_tracearg_compiled_instruction_sequence(rb_trace_arg_t *trace_arg)
+rb_tracearg_instruction_sequence(rb_trace_arg_t *trace_arg)
 {
     VALUE data = trace_arg->data;
 
@@ -1168,9 +1168,9 @@ tracepoint_attr_raised_exception(VALUE t https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L1168
  * If loaded from a file, it will return nil.
  */
 static VALUE
-tracepoint_attr_compiled_eval_script(VALUE tpval)
+tracepoint_attr_eval_script(VALUE tpval)
 {
-    return rb_tracearg_compiled_eval_script(get_trace_arg());
+    return rb_tracearg_eval_script(get_trace_arg());
 }
 
 /*
@@ -1180,9 +1180,9 @@ tracepoint_attr_compiled_eval_script(VAL https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L1180
  * Note that this method is MRI specific.
  */
 static VALUE
-tracepoint_attr_compiled_instruction_sequence(VALUE tpval)
+tracepoint_attr_instruction_sequence(VALUE tpval)
 {
-    return rb_tracearg_compiled_instruction_sequence(get_trace_arg());
+    return rb_tracearg_instruction_sequence(get_trace_arg());
 }
 
 static void
@@ -1818,8 +1818,8 @@ Init_vm_trace(void) https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L1818
     rb_define_method(rb_cTracePoint, "self", tracepoint_attr_self, 0);
     rb_define_method(rb_cTracePoint, "return_value", tracepoint_attr_return_value, 0);
     rb_define_method(rb_cTracePoint, "raised_exception", tracepoint_attr_raised_exception, 0);
-    rb_define_method(rb_cTracePoint, "compiled_eval_script", tracepoint_attr_compiled_eval_script, 0);
-    rb_define_method(rb_cTracePoint, "compiled_instruction_sequence", tracepoint_attr_compiled_instruction_sequence, 0);
+    rb_define_method(rb_cTracePoint, "eval_script", tracepoint_attr_eval_script, 0);
+    rb_define_method(rb_cTracePoint, "instruction_sequence", tracepoint_attr_instruction_sequence, 0);
 
     rb_define_singleton_method(rb_cTracePoint, "stat", tracepoint_stat_s, 0);
 }
Index: NEWS
===================================================================
--- NEWS	(revision 66363)
+++ NEWS	(revision 66364)
@@ -327,15 +327,15 @@ sufficient information, see the ChangeLo https://github.com/ruby/ruby/blob/trunk/NEWS#L327
 
   [New features]
 
-    * "compiled_script" event is supported. [Feature #15287]
+    * "script_compiled" event is supported. [Feature #15287]
 
   [New methods]
 
     * TracePoint#parameters [Feature #14694]
 
-    * TracePoint#compiled_instruction_sequence [Feature #15287]
+    * TracePoint#instruction_sequence [Feature #15287]
 
-    * TracePoint#compiled_eval_script [Feature #15287]
+    * TracePoint#eval_script [Feature #15287]
 
   [Modified methods]
 
Index: test/ruby/test_settracefunc.rb
===================================================================
--- test/ruby/test_settracefunc.rb	(revision 66363)
+++ test/ruby/test_settracefunc.rb	(revision 66364)
@@ -2089,8 +2089,8 @@ class TestSetTraceFunc < Test::Unit::Tes https://github.com/ruby/ruby/blob/trunk/test/ruby/test_settracefunc.rb#L2089
     events = []
     tp = TracePoint.new(:script_compiled){|tp|
       next unless target_thread?
-      events << [tp.compiled_instruction_sequence.path,
-                 tp.compiled_eval_script]
+      events << [tp.instruction_sequence.path,
+                 tp.eval_script]
     }
 
     eval_script = 'a = 1'

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

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