diff --git a/vm/callstack.cpp b/vm/callstack.cpp index f18dc04392..70378da1d5 100755 --- a/vm/callstack.cpp +++ b/vm/callstack.cpp @@ -132,7 +132,7 @@ void factor_vm::primitive_callstack_to_array() data_root callstack(ctx->pop(),this); stack_frame_accumulator accum(this); - iterate_callstack_object_reversed(callstack.untagged(),accum); + iterate_callstack_object(callstack.untagged(),accum); /* The callstack iterator visits frames in reverse order (top to bottom) */ std::reverse( diff --git a/vm/callstack.hpp b/vm/callstack.hpp index 8104bebb68..0872afe331 100755 --- a/vm/callstack.hpp +++ b/vm/callstack.hpp @@ -9,7 +9,7 @@ inline static cell callstack_object_size(cell size) /* This is a little tricky. The iterator may allocate memory, so we keep the callstack in a GC root and use relative offsets */ template -inline void factor_vm::iterate_callstack_object_reversed(callstack *stack_, +inline void factor_vm::iterate_callstack_object(callstack *stack_, Iterator &iterator, Fixup &fixup) { data_root stack(stack_,this); @@ -43,14 +43,14 @@ inline void factor_vm::iterate_callstack_object_reversed(callstack *stack_, } template -inline void factor_vm::iterate_callstack_object_reversed(callstack *stack_, Iterator &iterator) +inline void factor_vm::iterate_callstack_object(callstack *stack_, Iterator &iterator) { no_fixup none; - iterate_callstack_object_reversed(stack_, iterator, none); + iterate_callstack_object(stack_, iterator, none); } template -inline void factor_vm::iterate_callstack_reversed(context *ctx, Iterator &iterator, Fixup &fixup) +inline void factor_vm::iterate_callstack(context *ctx, Iterator &iterator, Fixup &fixup) { if (ctx->callstack_top == ctx->callstack_bottom) return; @@ -92,10 +92,10 @@ inline void factor_vm::iterate_callstack_reversed(context *ctx, Iterator &iterat } template -inline void factor_vm::iterate_callstack_reversed(context *ctx, Iterator &iterator) +inline void factor_vm::iterate_callstack(context *ctx, Iterator &iterator) { no_fixup none; - iterate_callstack_reversed(ctx, iterator, none); + iterate_callstack(ctx, iterator, none); } diff --git a/vm/code_block_visitor.hpp b/vm/code_block_visitor.hpp index 53cd1befbb..4bd6092052 100644 --- a/vm/code_block_visitor.hpp +++ b/vm/code_block_visitor.hpp @@ -78,7 +78,7 @@ void code_block_visitor::visit_object_code_block(object *obj) { callstack *stack = (callstack *)obj; call_frame_code_block_visitor call_frame_visitor(parent,fixup); - parent->iterate_callstack_object_reversed(stack,call_frame_visitor,fixup); + parent->iterate_callstack_object(stack,call_frame_visitor,fixup); break; } } @@ -114,7 +114,7 @@ template void code_block_visitor::visit_context_code_blocks() { call_frame_code_block_visitor call_frame_visitor(parent,fixup); - parent->iterate_active_callstacks_reversed(call_frame_visitor,fixup); + parent->iterate_active_callstacks(call_frame_visitor,fixup); } template diff --git a/vm/debug.cpp b/vm/debug.cpp index 02896ae8de..e916fb83b7 100755 --- a/vm/debug.cpp +++ b/vm/debug.cpp @@ -248,7 +248,7 @@ void factor_vm::print_callstack() if (ctx) { stack_frame_printer printer(this); - iterate_callstack_reversed(ctx,printer); + iterate_callstack(ctx,printer); } else std::cout << "*** Context not initialized" << std::endl; diff --git a/vm/gc.cpp b/vm/gc.cpp index 6c66af098a..aa0fe224e4 100755 --- a/vm/gc.cpp +++ b/vm/gc.cpp @@ -253,7 +253,7 @@ struct call_frame_scrubber { void factor_vm::scrub_context(context *ctx) { call_frame_scrubber scrubber(this,ctx); - iterate_callstack_reversed(ctx,scrubber); + iterate_callstack(ctx,scrubber); } void factor_vm::scrub_contexts() diff --git a/vm/slot_visitor.hpp b/vm/slot_visitor.hpp index 03719e6744..88a12e0991 100755 --- a/vm/slot_visitor.hpp +++ b/vm/slot_visitor.hpp @@ -369,14 +369,14 @@ template void slot_visitor::visit_callstack_object(callstack *stack) { call_frame_slot_visitor call_frame_visitor(parent,this); - parent->iterate_callstack_object_reversed(stack,call_frame_visitor,fixup); + parent->iterate_callstack_object(stack,call_frame_visitor,fixup); } template void slot_visitor::visit_callstack(context *ctx) { call_frame_slot_visitor call_frame_visitor(parent,this); - parent->iterate_callstack_reversed(ctx,call_frame_visitor,fixup); + parent->iterate_callstack(ctx,call_frame_visitor,fixup); } template diff --git a/vm/vm.hpp b/vm/vm.hpp index 87e6541725..7a30f0184c 100755 --- a/vm/vm.hpp +++ b/vm/vm.hpp @@ -179,13 +179,13 @@ struct factor_vm void primitive_load_locals(); template - void iterate_active_callstacks_reversed(Iterator &iter, Fixup &fixup) + void iterate_active_callstacks(Iterator &iter, Fixup &fixup) { std::set::const_iterator begin = active_contexts.begin(); std::set::const_iterator end = active_contexts.end(); while(begin != end) { - iterate_callstack_reversed(*begin++,iter,fixup); + iterate_callstack(*begin++,iter,fixup); } } @@ -622,10 +622,10 @@ struct factor_vm bool embedded_image_p(); template - void iterate_callstack_object_reversed(callstack *stack_, Iterator &iterator, + void iterate_callstack_object(callstack *stack_, Iterator &iterator, Fixup &fixup); template - void iterate_callstack_object_reversed(callstack *stack_, Iterator &iterator); + void iterate_callstack_object(callstack *stack_, Iterator &iterator); void check_frame(stack_frame *frame); callstack *allot_callstack(cell size); @@ -649,9 +649,9 @@ struct factor_vm void primitive_callstack_bounds(); template - void iterate_callstack_reversed(context *ctx, Iterator &iterator, Fixup &fixup); + void iterate_callstack(context *ctx, Iterator &iterator, Fixup &fixup); template - void iterate_callstack_reversed(context *ctx, Iterator &iterator); + void iterate_callstack(context *ctx, Iterator &iterator); // cpu-* void dispatch_signal_handler(cell *sp, cell *pc, cell newpc);