void factor_vm::deallocate_inline_cache(cell return_address) { // Find the call target. void* old_entry_point = get_call_target(return_address); code_block* old_block = (code_block*)old_entry_point - 1; // Free the old PIC since we know its unreachable if (old_block->pic_p()) code->free(old_block); }
void factor_vm::deallocate_inline_cache(cell return_address) { /* Find the call target. */ void *old_xt = get_call_target(return_address); check_code_pointer((cell)old_xt); code_block *old_block = (code_block *)old_xt - 1; cell old_type = old_block->type(); #ifdef FACTOR_DEBUG /* The call target was either another PIC, or a compiled quotation (megamorphic stub) */ assert(old_type == PIC_TYPE || old_type == QUOTATION_TYPE); #endif if(old_type == PIC_TYPE) code->code_heap_free(old_block); }