]> gitweb.factorcode.org Git - factor.git/commitdiff
moved callstack.hpp functions to vm
authorPhil Dawes <phil@phildawes.net>
Mon, 17 Aug 2009 20:37:11 +0000 (21:37 +0100)
committerPhil Dawes <phil@phildawes.net>
Wed, 16 Sep 2009 07:16:23 +0000 (08:16 +0100)
vm/callstack.hpp
vm/code_heap.hpp
vm/vm.hpp

index ea62f6da4b9382cedc315b525c5d15b8fcc807c6..7e7e5cc20bdf70bba65163edbdb51bd496977eb1 100755 (executable)
@@ -35,7 +35,7 @@ template<typename T> void iterate_callstack(cell top, cell bottom, T &iterator)
 
 /* This is a little tricky. The iterator may allocate memory, so we
 keep the callstack in a GC root and use relative offsets */
-template<typename T> void iterate_callstack_object(callstack *stack_, T &iterator)
+template<typename T> void factorvm::iterate_callstack_object(callstack *stack_, T &iterator)
 {
        gc_root<callstack> stack(stack_,vm);
        fixnum frame_offset = untag_fixnum(stack->length) - sizeof(stack_frame);
@@ -48,4 +48,9 @@ template<typename T> void iterate_callstack_object(callstack *stack_, T &iterato
        }
 }
 
+template<typename T> void iterate_callstack_object(callstack *stack_, T &iterator)
+{
+       return vm->iterate_callstack_object(stack_,iterator);
+}
+
 }
index a77a89b827d0b724c5d3e20e3ddd9140e93d669a..20d2b974d3c0fdde5982ba98af19db7ffb7ed89b 100755 (executable)
@@ -10,8 +10,6 @@ bool in_code_heap_p(cell ptr);
 
 void jit_compile_word(cell word, cell def, bool relocate);
 
-//typedef void (*code_heap_iterator)(code_block *compiled);
-
 void iterate_code_heap(code_heap_iterator iter);
 
 void copy_code_heap_roots();
index 5db239626df55c6bd72bbc8f78dff5195c22b60b..2c52ffcf5dc0933c8b112bcf7584535ec43a312b 100644 (file)
--- a/vm/vm.hpp
+++ b/vm/vm.hpp
@@ -466,6 +466,7 @@ struct factorvm {
        void load_image(vm_parameters *p);
 
        //callstack
+       template<typename T> void iterate_callstack_object(callstack *stack_, T &iterator);
        void check_frame(stack_frame *frame);
        callstack *allot_callstack(cell size);
        stack_frame *fix_callstack_top(stack_frame *top, stack_frame *bottom);