]> gitweb.factorcode.org Git - factor.git/commitdiff
VM: init_code_heap is trivial and only used once, so let's remove it
authorBjörn Lindqvist <bjourne@gmail.com>
Wed, 29 Jul 2015 15:35:34 +0000 (17:35 +0200)
committerBjörn Lindqvist <bjourne@gmail.com>
Tue, 4 Aug 2015 14:02:08 +0000 (16:02 +0200)
vm/code_heap.cpp
vm/image.cpp
vm/vm.hpp

index 7d82e088e3772144f9d8459ac2db55dcf1eae3d6..84740f5f0b455550b7c96374b8fceddd6e0acf7e 100644 (file)
@@ -94,9 +94,6 @@ void code_heap::initialize_all_blocks_set() {
 #endif
 }
 
-/* Allocate a code heap during startup */
-void factor_vm::init_code_heap(cell size) { code = new code_heap(size); }
-
 /* Update pointers to words referenced from all code blocks.
 Only needed after redefining an existing word.
 If generic words were redefined, inline caches need to be reset. */
index 972b30c1aa563b92692d478e2e52bd14a60e93ff..1fbd8e248e1706034ff1981cf0f6608dcd7b0055 100644 (file)
@@ -33,7 +33,7 @@ void factor_vm::load_code_heap(FILE* file, image_header* h, vm_parameters* p) {
   if (h->code_size > p->code_size)
     fatal_error("Code heap too small to fit image", h->code_size);
 
-  init_code_heap(p->code_size);
+  code = new code_heap(p->code_size);
 
   if (h->code_size != 0) {
     size_t bytes_read =
index d1120a6fab784011fa4ba399ffe10f96212042ff..a6df76f58c28d8ec3f4c25fe3202a4da4372f06c 100644 (file)
--- a/vm/vm.hpp
+++ b/vm/vm.hpp
@@ -587,7 +587,6 @@ struct factor_vm {
     code->allocator->iterate(iter);
   }
 
-  void init_code_heap(cell size);
   void update_code_heap_words(bool reset_inline_caches);
   void initialize_code_blocks();
   void primitive_modify_code_heap();