From 7da72ac77c238a7d0e37e0e39679223e407be453 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Sun, 13 Dec 2015 08:20:20 +0100 Subject: [PATCH] VM: the compute_vm_address method can be removed --- vm/code_blocks.cpp | 6 +----- vm/vm.hpp | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/vm/code_blocks.cpp b/vm/code_blocks.cpp index 7625ce9c11..2088a3d9b4 100644 --- a/vm/code_blocks.cpp +++ b/vm/code_blocks.cpp @@ -158,10 +158,6 @@ cell factor_vm::compute_dlsym_address(array* parameters, return sym ? sym : undef; } -cell factor_vm::compute_vm_address(cell arg) { - return (cell)this + untag_fixnum(arg); -} - cell factor_vm::lookup_external_address(relocation_type rel_type, code_block *compiled, array* parameters, @@ -174,7 +170,7 @@ cell factor_vm::lookup_external_address(relocation_type rel_type, case RT_MEGAMORPHIC_CACHE_HITS: return (cell)&dispatch_stats.megamorphic_cache_hits; case RT_VM: - return compute_vm_address(array_nth(parameters, index)); + return (cell)this + untag_fixnum(array_nth(parameters, index)); case RT_CARDS_OFFSET: return cards_offset; case RT_DECKS_OFFSET: diff --git a/vm/vm.hpp b/vm/vm.hpp index c1b63e0ada..0bd2429fd9 100644 --- a/vm/vm.hpp +++ b/vm/vm.hpp @@ -572,7 +572,6 @@ struct factor_vm { void update_word_references(code_block* compiled, bool reset_inline_caches); void undefined_symbol(); cell compute_dlsym_address(array* literals, cell index, bool toc); - cell compute_vm_address(cell arg); cell lookup_external_address(relocation_type rel_type, code_block* compiled, array* parameters,