diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-04-15 12:57:14 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-04-15 16:06:48 +0900 |
commit | 69b3e0ac59f99bbd7e9a76af283f0be1991a3bde (patch) | |
tree | 6745fa66cd5cbcf2b9ad235cf4a6f400957a9ad9 /iseq.c | |
parent | a9567cc2bfad37cc22b3efe0971ba85bd9c1df34 (diff) |
Create succ_index_table as a part of `iseq_setup`
With compiling `CPDEBUG >= 2`, `rb_iseq_disasm` segfaults if this
table has not been created. Also `ibf_load_iseq_each` calls
`rb_iseq_insns_info_encode_positions`.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3033
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -615,6 +615,7 @@ void rb_iseq_insns_info_encode_positions(const rb_iseq_t *iseq) { #if VM_INSN_INFO_TABLE_IMPL == 2 + /* create succ_index_table */ struct rb_iseq_constant_body *const body = iseq->body; int size = body->insns_info.size; int max_pos = body->iseq_size; @@ -657,13 +658,6 @@ finish_iseq_build(rb_iseq_t *iseq) ISEQ_COMPILE_DATA_CLEAR(iseq); compile_data_free(data); -#if VM_INSN_INFO_TABLE_IMPL == 2 /* succinct bitvector */ - /* create succ_index_table */ - if (body->insns_info.succ_index_table == NULL) { - rb_iseq_insns_info_encode_positions(iseq); - } -#endif - #if VM_CHECK_MODE > 0 && VM_INSN_INFO_TABLE_IMPL > 0 validate_get_insn_info(iseq); #endif |