summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2022-07-26 18:19:44 -0700
committerJohn Hawthorn <john@hawthorn.email>2022-09-01 15:20:49 -0700
commit1cc97412cd8168d897b1b361c8fa2cf792a51729 (patch)
treed05b35c7bc71eb3c75602f20d7078abfa6a451e5 /iseq.c
parent679ef34586e7a43151865cb7f33a3253d815f7cf (diff)
downloadruby-1cc97412cd8168d897b1b361c8fa2cf792a51729.tar.gz
Remove rb_iseq_each
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/iseq.c b/iseq.c
index dca41a146d..4892d93df1 100644
--- a/iseq.c
+++ b/iseq.c
@@ -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)
{