From 070caf54d2a17168d3de05aa1633979c8545f8f4 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 2 Jun 2021 01:16:49 -0700 Subject: Refactor rb_vm_insn_addr2insn calls It's been a way too much amount of ifdefs. --- mjit_worker.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'mjit_worker.c') diff --git a/mjit_worker.c b/mjit_worker.c index f2bfb510cd..3a73f14679 100644 --- a/mjit_worker.c +++ b/mjit_worker.c @@ -734,11 +734,7 @@ set_compiling_iseqs(const rb_iseq_t *iseq) unsigned int pos = 0; while (pos < iseq->body->iseq_size) { -#if OPT_DIRECT_THREADED_CODE || OPT_CALL_THREADED_CODE - int insn = rb_vm_insn_addr2insn((void *)iseq->body->iseq_encoded[pos]); -#else - int insn = (int)iseq->body->iseq_encoded[pos]; -#endif + int insn = rb_vm_insn_decode(iseq->body->iseq_encoded[pos]); if (insn == BIN(opt_send_without_block)) { CALL_DATA cd = (CALL_DATA)iseq->body->iseq_encoded[pos + 1]; extern const rb_iseq_t *rb_mjit_inlinable_iseq(const struct rb_callinfo *ci, const struct rb_callcache *cc); -- cgit v1.2.3