diff options
author | John Hawthorn <[email protected]> | 2022-07-26 18:19:44 -0700 |
---|---|---|
committer | John Hawthorn <[email protected]> | 2022-09-01 15:20:49 -0700 |
commit | 1cc97412cd8168d897b1b361c8fa2cf792a51729 (patch) | |
tree | d05b35c7bc71eb3c75602f20d7078abfa6a451e5 /iseq.c | |
parent | 679ef34586e7a43151865cb7f33a3253d815f7cf (diff) |
Remove rb_iseq_each
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6187
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 33 |
1 files changed, 0 insertions, 33 deletions
@@ -295,39 +295,6 @@ rb_iseq_each_value(const rb_iseq_t *iseq, iseq_value_itr_t * func, void *data) } } -// Similar to rb_iseq_each_value, except that this walks through each -// instruction instead of the associated VALUEs. The provided iterator should -// return a boolean that indicates whether or not to continue iterating. -void -rb_iseq_each(const rb_iseq_t *iseq, size_t start_index, rb_iseq_each_i iterator, void *data) -{ - unsigned int size; - VALUE *code; - size_t index; - - rb_vm_insns_translator_t *const translator = -#if OPT_DIRECT_THREADED_CODE || OPT_CALL_THREADED_CODE - (FL_TEST((VALUE)iseq, ISEQ_TRANSLATED)) ? rb_vm_insn_addr2insn2 : -#endif - rb_vm_insn_normalizing_translator; // Always pass non-trace opcodes. - - const struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq); - - size = body->iseq_size; - code = body->iseq_encoded; - - for (index = start_index; index < size;) { - void *addr = (void *) code[index]; - VALUE insn = translator(addr); - - if (!iterator(code, insn, index, data)) { - break; - } - - index += insn_len(insn); - } -} - static VALUE update_each_insn_value(void *ctx, VALUE obj) { |