mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
519c62fdc2
commit
402001d6c7
3 changed files with 19 additions and 19 deletions
16
compile.c
16
compile.c
|
@ -9804,7 +9804,7 @@ ibf_dump_setup(struct ibf_dump *dump, VALUE dumper_obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
VALUE
|
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_dump *dump;
|
||||||
struct ibf_header header = {{0}};
|
struct ibf_header header = {{0}};
|
||||||
|
@ -9863,14 +9863,14 @@ ibf_iseq_list(const struct ibf_load *load)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
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);
|
struct ibf_load *load = RTYPEDDATA_DATA(iseq->aux.loader.obj);
|
||||||
rb_iseq_t *prev_src_iseq = load->iseq;
|
rb_iseq_t *prev_src_iseq = load->iseq;
|
||||||
const ibf_offset_t offset = ibf_iseq_list(load)[iseq->aux.loader.index];
|
const ibf_offset_t offset = ibf_iseq_list(load)[iseq->aux.loader.index];
|
||||||
load->iseq = iseq;
|
load->iseq = iseq;
|
||||||
#if IBF_ISEQ_DEBUG
|
#if IBF_ISEQ_DEBUG
|
||||||
fprintf(stderr, "ibf_load_iseq_complete: index=%#x offset=%#x size=%#x\n",
|
fprintf(stderr, "rb_ibf_load_iseq_complete: index=%#x offset=%#x size=%#x\n",
|
||||||
iseq->aux.loader.index, offset,
|
iseq->aux.loader.index, offset,
|
||||||
load->header->size);
|
load->header->size);
|
||||||
#endif
|
#endif
|
||||||
|
@ -9888,7 +9888,7 @@ ibf_load_iseq_complete(rb_iseq_t *iseq)
|
||||||
const rb_iseq_t *
|
const rb_iseq_t *
|
||||||
rb_iseq_complete(const rb_iseq_t *iseq)
|
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;
|
return iseq;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -9932,7 +9932,7 @@ ibf_load_iseq(const struct ibf_load *load, const rb_iseq_t *index_iseq)
|
||||||
#if IBF_ISEQ_DEBUG
|
#if IBF_ISEQ_DEBUG
|
||||||
fprintf(stderr, "ibf_load_iseq: loading iseq=%p\n", iseq);
|
fprintf(stderr, "ibf_load_iseq: loading iseq=%p\n", iseq);
|
||||||
#endif
|
#endif
|
||||||
ibf_load_iseq_complete(iseq);
|
rb_ibf_load_iseq_complete(iseq);
|
||||||
#endif /* !USE_LAZY_LOAD */
|
#endif /* !USE_LAZY_LOAD */
|
||||||
|
|
||||||
#if IBF_ISEQ_DEBUG
|
#if IBF_ISEQ_DEBUG
|
||||||
|
@ -10020,7 +10020,7 @@ static const rb_data_type_t ibf_load_type = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const rb_iseq_t *
|
const rb_iseq_t *
|
||||||
iseq_ibf_load(VALUE str)
|
rb_iseq_ibf_load(VALUE str)
|
||||||
{
|
{
|
||||||
struct ibf_load *load;
|
struct ibf_load *load;
|
||||||
rb_iseq_t *iseq;
|
rb_iseq_t *iseq;
|
||||||
|
@ -10029,14 +10029,14 @@ iseq_ibf_load(VALUE str)
|
||||||
ibf_load_setup(load, loader_obj, str);
|
ibf_load_setup(load, loader_obj, str);
|
||||||
iseq = ibf_load_iseq(load, 0);
|
iseq = ibf_load_iseq(load, 0);
|
||||||
|
|
||||||
iseq_init_trace(iseq);
|
rb_iseq_init_trace(iseq);
|
||||||
|
|
||||||
RB_GC_GUARD(loader_obj);
|
RB_GC_GUARD(loader_obj);
|
||||||
return iseq;
|
return iseq;
|
||||||
}
|
}
|
||||||
|
|
||||||
VALUE
|
VALUE
|
||||||
iseq_ibf_load_extra_data(VALUE str)
|
rb_iseq_ibf_load_extra_data(VALUE str)
|
||||||
{
|
{
|
||||||
struct ibf_load *load;
|
struct ibf_load *load;
|
||||||
VALUE loader_obj = TypedData_Make_Struct(0, struct ibf_load, &ibf_load_type, load);
|
VALUE loader_obj = TypedData_Make_Struct(0, struct ibf_load, &ibf_load_type, load);
|
||||||
|
|
12
iseq.c
12
iseq.c
|
@ -505,7 +505,7 @@ rb_iseq_insns_info_decode_positions(const struct rb_iseq_constant_body *body)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
iseq_init_trace(rb_iseq_t *iseq)
|
rb_iseq_init_trace(rb_iseq_t *iseq)
|
||||||
{
|
{
|
||||||
iseq->aux.trace_events = 0;
|
iseq->aux.trace_events = 0;
|
||||||
if (ruby_vm_event_enabled_flags & ISEQ_TRACE_EVENTS) {
|
if (ruby_vm_event_enabled_flags & ISEQ_TRACE_EVENTS) {
|
||||||
|
@ -540,7 +540,7 @@ finish_iseq_build(rb_iseq_t *iseq)
|
||||||
rb_exc_raise(err);
|
rb_exc_raise(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
iseq_init_trace(iseq);
|
rb_iseq_init_trace(iseq);
|
||||||
return Qtrue;
|
return Qtrue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1203,7 +1203,7 @@ iseqw_check(VALUE iseqw)
|
||||||
rb_iseq_t *iseq = DATA_PTR(iseqw);
|
rb_iseq_t *iseq = DATA_PTR(iseqw);
|
||||||
|
|
||||||
if (!iseq->body) {
|
if (!iseq->body) {
|
||||||
ibf_load_iseq_complete(iseq);
|
rb_ibf_load_iseq_complete(iseq);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!iseq->body->location.label) {
|
if (!iseq->body->location.label) {
|
||||||
|
@ -3011,7 +3011,7 @@ iseqw_to_binary(int argc, VALUE *argv, VALUE self)
|
||||||
{
|
{
|
||||||
VALUE opt;
|
VALUE opt;
|
||||||
rb_scan_args(argc, argv, "01", &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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -3030,7 +3030,7 @@ iseqw_to_binary(int argc, VALUE *argv, VALUE self)
|
||||||
static VALUE
|
static VALUE
|
||||||
iseqw_s_load_from_binary(VALUE self, VALUE str)
|
iseqw_s_load_from_binary(VALUE self, VALUE str)
|
||||||
{
|
{
|
||||||
return iseqw_new(iseq_ibf_load(str));
|
return iseqw_new(rb_iseq_ibf_load(str));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -3042,7 +3042,7 @@ iseqw_s_load_from_binary(VALUE self, VALUE str)
|
||||||
static VALUE
|
static VALUE
|
||||||
iseqw_s_load_from_binary_extra_data(VALUE self, VALUE str)
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if VM_INSN_INFO_TABLE_IMPL == 2
|
#if VM_INSN_INFO_TABLE_IMPL == 2
|
||||||
|
|
10
iseq.h
10
iseq.h
|
@ -140,11 +140,11 @@ iseq_imemo_alloc(void)
|
||||||
return (rb_iseq_t *)rb_imemo_new(imemo_iseq, 0, 0, 0, 0);
|
return (rb_iseq_t *)rb_imemo_new(imemo_iseq, 0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
VALUE iseq_ibf_dump(const rb_iseq_t *iseq, VALUE opt);
|
VALUE rb_iseq_ibf_dump(const rb_iseq_t *iseq, VALUE opt);
|
||||||
void ibf_load_iseq_complete(rb_iseq_t *iseq);
|
void rb_ibf_load_iseq_complete(rb_iseq_t *iseq);
|
||||||
const rb_iseq_t *iseq_ibf_load(VALUE str);
|
const rb_iseq_t *rb_iseq_ibf_load(VALUE str);
|
||||||
VALUE iseq_ibf_load_extra_data(VALUE str);
|
VALUE rb_iseq_ibf_load_extra_data(VALUE str);
|
||||||
void iseq_init_trace(rb_iseq_t *iseq);
|
void rb_iseq_init_trace(rb_iseq_t *iseq);
|
||||||
|
|
||||||
#if VM_INSN_INFO_TABLE_IMPL == 2
|
#if VM_INSN_INFO_TABLE_IMPL == 2
|
||||||
unsigned int *rb_iseq_insns_info_decode_positions(const struct rb_iseq_constant_body *body);
|
unsigned int *rb_iseq_insns_info_decode_positions(const struct rb_iseq_constant_body *body);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue