]> gitweb.factorcode.org Git - factor.git/commitdiff
vm: remove _reversed from callstack iterator names
authorJoe Groff <arcata@gmail.com>
Tue, 6 Dec 2011 23:00:02 +0000 (15:00 -0800)
committerJoe Groff <arcata@gmail.com>
Wed, 14 Dec 2011 17:56:49 +0000 (09:56 -0800)
Now that they're the only game in town we can give them the short names

vm/callstack.cpp
vm/callstack.hpp
vm/code_block_visitor.hpp
vm/debug.cpp
vm/gc.cpp
vm/slot_visitor.hpp
vm/vm.hpp

index f18dc04392a2abbfe7724c15d75671cb6ff3aa19..70378da1d5758e0912799812bdc96e83e46a9f17 100755 (executable)
@@ -132,7 +132,7 @@ void factor_vm::primitive_callstack_to_array()
        data_root<callstack> 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(
index 8104bebb68a7426293c4c87093f4b5abe69b6080..0872afe331aa81532b8b6509d6d56e622b849c41 100755 (executable)
@@ -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<typename Iterator, typename Fixup>
-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<callstack> stack(stack_,this);
@@ -43,14 +43,14 @@ inline void factor_vm::iterate_callstack_object_reversed(callstack *stack_,
 }
 
 template<typename Iterator>
-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<typename Iterator, typename Fixup>
-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<typename Iterator>
-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);
 }
 
 
index 53cd1befbb9502c875186dbde6a04567f44ea41b..4bd6092052f54f6480ac3046b716ce314aa61ee7 100644 (file)
@@ -78,7 +78,7 @@ void code_block_visitor<Fixup>::visit_object_code_block(object *obj)
                {
                        callstack *stack = (callstack *)obj;
                        call_frame_code_block_visitor<Fixup> 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<typename Fixup>
 void code_block_visitor<Fixup>::visit_context_code_blocks()
 {
        call_frame_code_block_visitor<Fixup> call_frame_visitor(parent,fixup);
-       parent->iterate_active_callstacks_reversed(call_frame_visitor,fixup);
+       parent->iterate_active_callstacks(call_frame_visitor,fixup);
 }
 
 template<typename Fixup>
index 02896ae8de37a8fd2fdd857ff7378637798f999e..e916fb83b78eadb68d7bcd3c2b28d23adf26d90c 100755 (executable)
@@ -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;
index 6c66af098aa9f307cf0b53c4b45bbf84899d13f6..aa0fe224e43ea6d0a017662c5a6d6b15ccd93c5a 100755 (executable)
--- 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()
index 03719e67440546e3534f618cc496c34f6d553f0e..88a12e0991833fea1b7df10e1b0001fb7586ca3b 100755 (executable)
@@ -369,14 +369,14 @@ template<typename Fixup>
 void slot_visitor<Fixup>::visit_callstack_object(callstack *stack)
 {
        call_frame_slot_visitor<Fixup> 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<typename Fixup>
 void slot_visitor<Fixup>::visit_callstack(context *ctx)
 {
        call_frame_slot_visitor<Fixup> call_frame_visitor(parent,this);
-       parent->iterate_callstack_reversed(ctx,call_frame_visitor,fixup);
+       parent->iterate_callstack(ctx,call_frame_visitor,fixup);
 }
 
 template<typename Fixup>
index 87e65417253087aa21a80c5b67d0f2fac3b1d4d2..7a30f0184c821bdd4eebe408b80d94d7fc6b4ee5 100755 (executable)
--- a/vm/vm.hpp
+++ b/vm/vm.hpp
@@ -179,13 +179,13 @@ struct factor_vm
        void primitive_load_locals();
 
        template<typename Iterator, typename Fixup>
-       void iterate_active_callstacks_reversed(Iterator &iter, Fixup &fixup)
+       void iterate_active_callstacks(Iterator &iter, Fixup &fixup)
        {
                std::set<context *>::const_iterator begin = active_contexts.begin();
                std::set<context *>::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<typename Iterator, typename Fixup>
-       void iterate_callstack_object_reversed(callstack *stack_, Iterator &iterator,
+       void iterate_callstack_object(callstack *stack_, Iterator &iterator,
                Fixup &fixup);
        template<typename Iterator>
-       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<typename Iterator, typename Fixup>
-       void iterate_callstack_reversed(context *ctx, Iterator &iterator, Fixup &fixup);
+       void iterate_callstack(context *ctx, Iterator &iterator, Fixup &fixup);
        template<typename Iterator>
-       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);