summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2021-06-02 01:16:49 -0700
committerTakashi Kokubun <[email protected]>2021-06-02 01:16:50 -0700
commit070caf54d2a17168d3de05aa1633979c8545f8f4 (patch)
tree61ec56b0fd8090f5b367b770226607e1e963507c /compile.c
parentc32ce2cbf100edd2a88e4230f08879c7cc73a891 (diff)
Refactor rb_vm_insn_addr2insn calls
It's been a way too much amount of ifdefs.
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/compile.c b/compile.c
index b03e815229..aedc9c55b5 100644
--- a/compile.c
+++ b/compile.c
@@ -1383,11 +1383,7 @@ update_catch_except_flags(struct rb_iseq_constant_body *body)
BREAK/NEXT/REDO catch table entries are used only when `throw` insn is used in the block. */
pos = 0;
while (pos < body->iseq_size) {
-#if OPT_DIRECT_THREADED_CODE || OPT_CALL_THREADED_CODE
- insn = rb_vm_insn_addr2insn((void *)body->iseq_encoded[pos]);
-#else
- insn = (int)body->iseq_encoded[pos];
-#endif
+ insn = rb_vm_insn_decode(body->iseq_encoded[pos]);
if (insn == BIN(throw)) {
set_catch_except_p(body);
break;