summaryrefslogtreecommitdiff
path: root/mjit_worker.c
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2021-06-02 01:16:49 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2021-06-02 01:16:50 -0700
commit070caf54d2a17168d3de05aa1633979c8545f8f4 (patch)
tree61ec56b0fd8090f5b367b770226607e1e963507c /mjit_worker.c
parentc32ce2cbf100edd2a88e4230f08879c7cc73a891 (diff)
Refactor rb_vm_insn_addr2insn calls
It's been a way too much amount of ifdefs.
Diffstat (limited to 'mjit_worker.c')
-rw-r--r--mjit_worker.c6
1 files changed, 1 insertions, 5 deletions
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);