summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-05 14:35:07 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-05 14:35:07 +0000
commitaba207b7620d963e212e4187213db7e1eee7a790 (patch)
treefd24dfe63ee07d998d680b424d50930144abb558
parentf35b27b5abefb52e6e3dac2b33f4f7bfe8b5ca72 (diff)
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@users.noreply.github.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@66225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--compile.c14
-rw-r--r--iseq.c12
-rw-r--r--iseq.h10
-rw-r--r--version.h6
4 files changed, 21 insertions, 21 deletions
diff --git a/compile.c b/compile.c
index c00323707f..9405e11057 100644
--- a/compile.c
+++ b/compile.c
@@ -9351,7 +9351,7 @@ ibf_dump_setup(struct ibf_dump *dump, VALUE dumper_obj)
}
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 *load)
}
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)
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 *load, const rb_iseq_t *index_iseq)
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_type = {
};
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)
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);
diff --git a/iseq.c b/iseq.c
index 08eb15c7df..7d7398607e 100644
--- a/iseq.c
+++ b/iseq.c
@@ -350,7 +350,7 @@ static void validate_get_insn_info(rb_iseq_t *iseq);
#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)
rb_exc_raise(err);
}
- iseq_init_trace(iseq);
+ rb_iseq_init_trace(iseq);
return Qtrue;
}
@@ -1000,7 +1000,7 @@ iseqw_check(VALUE iseqw)
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, VALUE self)
{
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, VALUE self)
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, VALUE str)
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);
}
/*
diff --git a/iseq.h b/iseq.h
index 1ef8ce452b..65cf653e52 100644
--- a/iseq.h
+++ b/iseq.h
@@ -156,11 +156,11 @@ iseq_imemo_alloc(void)
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
diff --git a/version.h b/version.h
index dbef2bc594..30550cd368 100644
--- a/version.h
+++ b/version.h
@@ -1,10 +1,10 @@
#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"