]> gitweb.factorcode.org Git - factor.git/blobdiff - vm/contexts.cpp
webapps.wiki: adding search bar
[factor.git] / vm / contexts.cpp
index c922090ea79c5b6e94db71870abf13969ca976f6..48afadaa279556b99e9a1ecced1151e89474d5f9 100644 (file)
@@ -38,6 +38,10 @@ void context::fill_stack_seg(cell top_ptr, segment* seg, cell pattern) {
   cell clear_start = top_ptr + sizeof(cell);
   cell clear_size = seg->end - clear_start;
   memset_cell((void*)clear_start, pattern, clear_size);
+#else
+  (void)top_ptr;
+  (void)seg;
+  (void)pattern;
 #endif
 }
 
@@ -81,18 +85,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;
 
@@ -240,7 +232,7 @@ void factor_vm::primitive_retainstack_for() {
 }
 
 // returns pointer to top of stack
-cell factor_vm::array_to_stack(array* array, cell bottom) {
+static cell array_to_stack(array* array, cell bottom) {
   cell depth = array_capacity(array) * sizeof(cell);
   memcpy((void*)bottom, array + 1, depth);
   return bottom + depth - sizeof(cell);