]> gitweb.factorcode.org Git - factor.git/commitdiff
VM: the compute_vm_address method can be removed
authorBjörn Lindqvist <bjourne@gmail.com>
Sun, 13 Dec 2015 07:20:20 +0000 (08:20 +0100)
committerBjörn Lindqvist <bjourne@gmail.com>
Sun, 13 Dec 2015 12:56:36 +0000 (13:56 +0100)
vm/code_blocks.cpp
vm/vm.hpp

index 7625ce9c116b13da503c5d7d7ef732feaf680fb9..2088a3d9b4db3560ae93c46f11d05f619b677b2d 100644 (file)
@@ -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:
index c1b63e0ada73c756f90fe1ba3ca1e42cae1584aa..0bd2429fd99c8218d81dcdce7f1b1268269ba2a1 100644 (file)
--- 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,