summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-13 04:51:43 (GMT)
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-13 04:51:43 (GMT)
commit75d25ede15e664ee0048ebc4e84e9e34838c2313 (patch)
tree1b5fcd13797c42a3c2fa434e696d7bd6ac237d77
parent3b43173c64a15d291a30fced4d87762c32869fa5 (diff)
Make VM_INSN_INFO_TABLE_IMPL=1 work
rb_iseq_insns_info_decode_positions is used only when VM_INSN_INFO_TABLE_IMPL=2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--iseq.c4
-rw-r--r--iseq.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/iseq.c b/iseq.c
index e5210ca..f64177d 100644
--- a/iseq.c
+++ b/iseq.c
@@ -493,16 +493,16 @@ rb_iseq_insns_info_encode_positions(const rb_iseq_t *iseq)
#endif
}
+#if VM_INSN_INFO_TABLE_IMPL == 2
unsigned int *
rb_iseq_insns_info_decode_positions(const struct rb_iseq_constant_body *body)
{
-#if VM_INSN_INFO_TABLE_IMPL == 2
int size = body->insns_info.size;
int max_pos = body->iseq_size;
struct succ_index_table *sd = body->insns_info.succ_index_table;
return succ_index_table_invert(max_pos, sd, size);
-#endif
}
+#endif
static VALUE
finish_iseq_build(rb_iseq_t *iseq)
diff --git a/iseq.h b/iseq.h
index 7c6b56a..eba1716 100644
--- a/iseq.h
+++ b/iseq.h
@@ -143,7 +143,9 @@ 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);
+#if VM_INSN_INFO_TABLE_IMPL == 2
unsigned int *rb_iseq_insns_info_decode_positions(const struct rb_iseq_constant_body *body);
+#endif
RUBY_SYMBOL_EXPORT_BEGIN