diff --git a/vm/inline_cache.cpp b/vm/inline_cache.cpp index eaef447204..9c29299498 100644 --- a/vm/inline_cache.cpp +++ b/vm/inline_cache.cpp @@ -7,8 +7,6 @@ void factor_vm::init_inline_caching(int max_size) { max_pic_size = max_size; } void factor_vm::deallocate_inline_cache(cell return_address) { /* Find the call target. */ void* old_entry_point = get_call_target(return_address); - check_code_pointer((cell)old_entry_point); - code_block* old_block = (code_block*)old_entry_point - 1; /* Free the old PIC since we know its unreachable */ @@ -131,11 +129,6 @@ code_block* factor_vm::compile_inline_cache(fixnum index, cell generic_word_, return code; } -/* A generic word's definition performs general method lookup. */ -void* factor_vm::megamorphic_call_stub(cell generic_word) { - return untag(generic_word)->entry_point; -} - cell factor_vm::inline_cache_size(cell cache_entries) { return array_capacity(untag_check(cache_entries)) / 2; } @@ -173,7 +166,6 @@ void factor_vm::update_pic_transitions(cell pic_size) { /* Allocates memory */ void* factor_vm::inline_cache_miss(cell return_address_) { code_root return_address(return_address_, this); - check_code_pointer(return_address.value); bool tail_call_site = tail_call_site_p(return_address.value); #ifdef PIC_DEBUG @@ -196,7 +188,7 @@ void* factor_vm::inline_cache_miss(cell return_address_) { void* xt; if (pic_size >= max_pic_size) - xt = megamorphic_call_stub(generic_word.value()); + xt = generic_word->entry_point; else { cell klass = object_class(object.value()); cell method = lookup_method(object.value(), methods.value()); diff --git a/vm/vm.hpp b/vm/vm.hpp index 15895cbcb6..a6e628c9b5 100644 --- a/vm/vm.hpp +++ b/vm/vm.hpp @@ -598,8 +598,6 @@ struct factor_vm { cell literals_, cell frame_size_untagged); //code heap - inline void check_code_pointer(cell ptr) {} - template void each_code_block(Iterator& iter) { code->allocator->iterate(iter); } @@ -710,7 +708,6 @@ struct factor_vm { code_block* compile_inline_cache(fixnum index, cell generic_word_, cell methods_, cell cache_entries_, bool tail_call_p); - void* megamorphic_call_stub(cell generic_word); cell inline_cache_size(cell cache_entries); cell add_inline_cache_entry(cell cache_entries_, cell klass_, cell method_); void update_pic_transitions(cell pic_size);