diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-05 14:35:07 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-05 14:35:07 +0000 |
commit | aba207b7620d963e212e4187213db7e1eee7a790 (patch) | |
tree | fd24dfe63ee07d998d680b424d50930144abb558 /compile.c | |
parent | f35b27b5abefb52e6e3dac2b33f4f7bfe8b5ca72 (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
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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); |