]> gitweb.factorcode.org Git - factor.git/commitdiff
VM: removing factor_vm::init_contexts()
authorBjörn Lindqvist <bjourne@gmail.com>
Wed, 23 Nov 2016 02:50:28 +0000 (03:50 +0100)
committerBjörn Lindqvist <bjourne@gmail.com>
Wed, 23 Nov 2016 05:42:06 +0000 (06:42 +0100)
vm/contexts.cpp
vm/factor.cpp
vm/vm.hpp

index d110418db5052d749919e14b4af3741dbf93f7e4..d0e528722ecc1f2c99d2167f7cb2a1c44d2ceb07 100644 (file)
@@ -81,18 +81,6 @@ context::~context() {
   delete callstack_seg;
 }
 
-// called on startup
-// Allocates memory (new_context())
-void factor_vm::init_contexts(cell datastack_size_, cell retainstack_size_,
-                              cell callstack_size_) {
-  datastack_size = datastack_size_;
-  retainstack_size = retainstack_size_;
-  callstack_size = callstack_size_;
-
-  ctx = NULL;
-  spare_ctx = new_context();
-}
-
 context* factor_vm::new_context() {
   context* new_context;
 
index 7ef57d1f1270f134379fa8d9f55a96dfc3a415c8..2acf7596607998d92d4dd52818451b9a6d9b5784 100644 (file)
@@ -68,7 +68,14 @@ void factor_vm::init_factor(vm_parameters* p) {
 
   srand((unsigned int)nano_count());
   init_ffi();
-  init_contexts(p->datastack_size, p->retainstack_size, p->callstack_size);
+
+  datastack_size = p->datastack_size;
+  retainstack_size = p->retainstack_size;
+  callstack_size = p->callstack_size;
+
+  ctx = NULL;
+  spare_ctx = new_context();
+
   callbacks = new callback_heap(p->callback_size, this);
   load_image(p);
   max_pic_size = (int)p->max_pic_size;
index c52f1478cf86cb841589cbdc0e3ead0878735af2..e165233d38ebe31bb13e76a6f59a0be7eb6d5a33 100644 (file)
--- a/vm/vm.hpp
+++ b/vm/vm.hpp
@@ -156,8 +156,6 @@ struct factor_vm {
   context* new_context();
   void init_context(context* ctx);
   void delete_context();
-  void init_contexts(cell datastack_size_, cell retainstack_size_,
-                     cell callstack_size_);
   cell begin_callback(cell quot);
   void end_callback();
   void primitive_current_callback();