moved callstack.hpp functions to vm
parent
ae5c0fbfb2
commit
a6c3c1e7d2
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue