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

ruby-changes:54005

From: nagachika <ko1@a...>
Date: Wed, 5 Dec 2018 23:35:13 +0900 (JST)
Subject: [ruby-changes:54005] nagachika:r66225 (ruby_2_5): merge revision(s) 64736, 65567: [Backport #15270]

nagachika	2018-12-05 23:35:07 +0900 (Wed, 05 Dec 2018)

  New Revision: 66225

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

  Log:
    merge revision(s) 64736,65567: [Backport #15270]
    
    iseq.c: prefix rb_ to non-static iseq functions
    
    I assume we always prefix rb_ to non-static functions to avoid conflict.
    These functions are not exported and safe to be renamed.
    
    iseq.h: ditto
    compile.c: ditto
    
    Fix TracePoint for nested iseq loaded from binary [Bug#14702]
    
    When loading iseq from binary while a TracePoint is on, we need to
    recompile instructions to their "trace_" variant. Before this commit
    we only recompiled instructions in the top level iseq, which meant
    that TracePoint was malfunctioning for code inside module/class/method
    definitions.
    
    * compile.c: Move rb_iseq_init_trace to rb_ibf_load_iseq_complete.
      It is called on all iseqs during loading.
    
    * test_iseq.rb: Test that tracepoints fire within children iseq when
      using load_from_binary.
    
    This patch is from: Alan Wu <XrXr@u...>

  Modified directories:
    branches/ruby_2_5/
  Modified files:
    branches/ruby_2_5/compile.c
    branches/ruby_2_5/iseq.c
    branches/ruby_2_5/iseq.h
    branches/ruby_2_5/version.h
Index: ruby_2_5/compile.c
===================================================================
--- ruby_2_5/compile.c	(revision 66224)
+++ ruby_2_5/compile.c	(revision 66225)
@@ -9351,7 +9351,7 @@ ibf_dump_setup(struct ibf_dump *dump, VA https://github.com/ruby/ruby/blob/trunk/ruby_2_5/compile.c#L9351
 }
 
 VALUE
-iseq_ibf_dump(const rb_iseq_t *iseq, VALUE opt)
+rb_iseq_ibf_dump(const rb_iseq_t *iseq, VALUE opt)
 {
     struct ibf_dump *dump;
     struct ibf_header header = {{0}};
@@ -9410,7 +9410,7 @@ ibf_iseq_list(const struct ibf_load *loa https://github.com/ruby/ruby/blob/trunk/ruby_2_5/compile.c#L9410
 }
 
 void
-ibf_load_iseq_complete(rb_iseq_t *iseq)
+rb_ibf_load_iseq_complete(rb_iseq_t *iseq)
 {
     struct ibf_load *load = RTYPEDDATA_DATA(iseq->aux.loader.obj);
     rb_iseq_t *prev_src_iseq = load->iseq;
@@ -9425,7 +9425,7 @@ ibf_load_iseq_complete(rb_iseq_t *iseq) https://github.com/ruby/ruby/blob/trunk/ruby_2_5/compile.c#L9425
 const rb_iseq_t *
 rb_iseq_complete(const rb_iseq_t *iseq)
 {
-    ibf_load_iseq_complete((rb_iseq_t *)iseq);
+    rb_ibf_load_iseq_complete((rb_iseq_t *)iseq);
     return iseq;
 }
 #endif
@@ -9452,7 +9452,7 @@ ibf_load_iseq(const struct ibf_load *loa https://github.com/ruby/ruby/blob/trunk/ruby_2_5/compile.c#L9452
 	    rb_ary_store(load->iseq_list, iseq_index, (VALUE)iseq);
 
 #if !USE_LAZY_LOAD
-	    ibf_load_iseq_complete(iseq);
+	    rb_ibf_load_iseq_complete(iseq);
 #endif /* !USE_LAZY_LOAD */
 
 	    if (load->iseq) {
@@ -9527,7 +9527,7 @@ static const rb_data_type_t ibf_load_typ https://github.com/ruby/ruby/blob/trunk/ruby_2_5/compile.c#L9527
 };
 
 const rb_iseq_t *
-iseq_ibf_load(VALUE str)
+rb_iseq_ibf_load(VALUE str)
 {
     struct ibf_load *load;
     rb_iseq_t *iseq;
@@ -9536,14 +9536,14 @@ iseq_ibf_load(VALUE str) https://github.com/ruby/ruby/blob/trunk/ruby_2_5/compile.c#L9536
     ibf_load_setup(load, loader_obj, str);
     iseq = ibf_load_iseq(load, 0);
 
-    iseq_init_trace(iseq);
+    rb_iseq_init_trace(iseq);
 
     RB_GC_GUARD(loader_obj);
     return iseq;
 }
 
 VALUE
-iseq_ibf_load_extra_data(VALUE str)
+rb_iseq_ibf_load_extra_data(VALUE str)
 {
     struct ibf_load *load;
     VALUE loader_obj = TypedData_Make_Struct(0, struct ibf_load, &ibf_load_type, load);
Index: ruby_2_5/version.h
===================================================================
--- ruby_2_5/version.h	(revision 66224)
+++ ruby_2_5/version.h	(revision 66225)
@@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_5/version.h#L1
 #define RUBY_VERSION "2.5.4"
-#define RUBY_RELEASE_DATE "2018-12-02"
-#define RUBY_PATCHLEVEL 118
+#define RUBY_RELEASE_DATE "2018-12-05"
+#define RUBY_PATCHLEVEL 119
 
 #define RUBY_RELEASE_YEAR 2018
 #define RUBY_RELEASE_MONTH 12
-#define RUBY_RELEASE_DAY 2
+#define RUBY_RELEASE_DAY 5
 
 #include "ruby/version.h"
 
Index: ruby_2_5/iseq.c
===================================================================
--- ruby_2_5/iseq.c	(revision 66224)
+++ ruby_2_5/iseq.c	(revision 66225)
@@ -350,7 +350,7 @@ static void validate_get_insn_info(rb_is https://github.com/ruby/ruby/blob/trunk/ruby_2_5/iseq.c#L350
 #endif
 
 void
-iseq_init_trace(rb_iseq_t *iseq)
+rb_iseq_init_trace(rb_iseq_t *iseq)
 {
     iseq->aux.trace_events = 0;
     if (ruby_vm_event_enabled_flags & ISEQ_TRACE_EVENTS) {
@@ -377,7 +377,7 @@ finish_iseq_build(rb_iseq_t *iseq) https://github.com/ruby/ruby/blob/trunk/ruby_2_5/iseq.c#L377
 	rb_exc_raise(err);
     }
 
-    iseq_init_trace(iseq);
+    rb_iseq_init_trace(iseq);
     return Qtrue;
 }
 
@@ -1000,7 +1000,7 @@ iseqw_check(VALUE iseqw) https://github.com/ruby/ruby/blob/trunk/ruby_2_5/iseq.c#L1000
     rb_iseq_t *iseq = DATA_PTR(iseqw);
 
     if (!iseq->body) {
-	ibf_load_iseq_complete(iseq);
+	rb_ibf_load_iseq_complete(iseq);
     }
 
     if (!iseq->body->location.label) {
@@ -2652,7 +2652,7 @@ iseqw_to_binary(int argc, VALUE *argv, V https://github.com/ruby/ruby/blob/trunk/ruby_2_5/iseq.c#L2652
 {
     VALUE opt;
     rb_scan_args(argc, argv, "01", &opt);
-    return iseq_ibf_dump(iseqw_check(self), opt);
+    return rb_iseq_ibf_dump(iseqw_check(self), opt);
 }
 
 /*
@@ -2671,7 +2671,7 @@ iseqw_to_binary(int argc, VALUE *argv, V https://github.com/ruby/ruby/blob/trunk/ruby_2_5/iseq.c#L2671
 static VALUE
 iseqw_s_load_from_binary(VALUE self, VALUE str)
 {
-    return iseqw_new(iseq_ibf_load(str));
+    return iseqw_new(rb_iseq_ibf_load(str));
 }
 
 /*
@@ -2683,7 +2683,7 @@ iseqw_s_load_from_binary(VALUE self, VAL https://github.com/ruby/ruby/blob/trunk/ruby_2_5/iseq.c#L2683
 static VALUE
 iseqw_s_load_from_binary_extra_data(VALUE self, VALUE str)
 {
-    return  iseq_ibf_load_extra_data(str);
+    return rb_iseq_ibf_load_extra_data(str);
 }
 
 /*
Index: ruby_2_5/iseq.h
===================================================================
--- ruby_2_5/iseq.h	(revision 66224)
+++ ruby_2_5/iseq.h	(revision 66225)
@@ -156,11 +156,11 @@ iseq_imemo_alloc(void) https://github.com/ruby/ruby/blob/trunk/ruby_2_5/iseq.h#L156
     return (rb_iseq_t *)rb_imemo_new(imemo_iseq, 0, 0, 0, 0);
 }
 
-VALUE iseq_ibf_dump(const rb_iseq_t *iseq, VALUE opt);
-void ibf_load_iseq_complete(rb_iseq_t *iseq);
-const rb_iseq_t *iseq_ibf_load(VALUE str);
-VALUE iseq_ibf_load_extra_data(VALUE str);
-void iseq_init_trace(rb_iseq_t *iseq);
+VALUE rb_iseq_ibf_dump(const rb_iseq_t *iseq, VALUE opt);
+void rb_ibf_load_iseq_complete(rb_iseq_t *iseq);
+const rb_iseq_t *rb_iseq_ibf_load(VALUE str);
+VALUE rb_iseq_ibf_load_extra_data(VALUE str);
+void rb_iseq_init_trace(rb_iseq_t *iseq);
 
 RUBY_SYMBOL_EXPORT_BEGIN
 
Index: ruby_2_5
===================================================================
--- ruby_2_5	(revision 66224)
+++ ruby_2_5	(revision 66225)

Property changes on: ruby_2_5
___________________________________________________________________
Modified: svn:mergeinfo
## -0,0 +0,1 ##
   Merged /trunk:r64736

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

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