diff options
author | Aaron Patterson <[email protected]> | 2021-07-15 11:31:59 -0700 |
---|---|---|
committer | Alan Wu <[email protected]> | 2021-10-20 18:19:38 -0400 |
commit | 8fd3e0e9ff158205f473cd625298aedfe65fa0af (patch) | |
tree | b7f30165fb563bd5351457587977b6cbeb21bcb4 /yjit_core.c | |
parent | 05b5a7f01139a3c9610b80194e4385928dd4cd55 (diff) |
Fix BOP invalidation
Instead of mutating the iseqs, just clear the JIT function.
Diffstat (limited to 'yjit_core.c')
-rw-r--r-- | yjit_core.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/yjit_core.c b/yjit_core.c index 988f034fc9..8af35258b2 100644 --- a/yjit_core.c +++ b/yjit_core.c @@ -943,17 +943,9 @@ invalidate_block_version(block_t* block) } } - uint32_t idx = block->blockid.idx; - // FIXME: the following says "if", but it's unconditional. - // If the block is an entry point, it needs to be unmapped from its iseq - VALUE* entry_pc = yjit_iseq_pc_at_idx(iseq, idx); - int entry_opcode = yjit_opcode_at_pc(iseq, entry_pc); - - // TODO: unmap_addr2insn in yjit_iface.c? Maybe we can write a function to encompass this logic? - // Should check how it's used in exit and side-exit - const void * const *handler_table = rb_vm_get_insns_address_table(); - void* handler_addr = (void*)handler_table[entry_opcode]; - iseq->body->iseq_encoded[idx] = (VALUE)handler_addr; + // Clear out the JIT func so that we can recompile later and so the + // interpreter will run the iseq + iseq->body->jit_func = 0; // TODO: // May want to recompile a new entry point (for interpreter entry blocks) |