From 83262f24896abeaf1977c8837cbefb1b27040bef Mon Sep 17 00:00:00 2001 From: mame Date: Tue, 9 Jan 2018 14:05:23 +0000 Subject: iseq.c: Add a succinct bitvector implementation for insn_info_table git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_core.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'vm_core.h') diff --git a/vm_core.h b/vm_core.h index 7801ce1706..176ec9d333 100644 --- a/vm_core.h +++ b/vm_core.h @@ -60,8 +60,11 @@ * implementation selector of get_insn_info algorithm * 0: linear search * 1: binary search + * 2: succinct bitvector */ -#define VM_INSN_INFO_TABLE_IMPL 1 +#ifndef VM_INSN_INFO_TABLE_IMPL +# define VM_INSN_INFO_TABLE_IMPL 2 +#endif #include "ruby/ruby.h" #include "ruby/st.h" @@ -380,8 +383,11 @@ struct rb_iseq_constant_body { /* insn info, must be freed */ struct iseq_insn_info { const struct iseq_insn_info_entry *body; - const unsigned int *positions; + unsigned int *positions; unsigned int size; +#if VM_INSN_INFO_TABLE_IMPL == 2 + struct succ_index_table *succ_index_table; +#endif } insns_info; const ID *local_table; /* must free */ -- cgit v1.2.3