summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-09 14:05:23 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-09 14:05:23 +0000
commit83262f24896abeaf1977c8837cbefb1b27040bef (patch)
tree0580edac419406bd440effb4c4ddefd8f46d4f9c /vm_core.h
parent6d2de83bf027073cbb2d6b7dd1be10bb56c27bbc (diff)
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
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h10
1 files changed, 8 insertions, 2 deletions
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 */