]> gitweb.factorcode.org Git - factor.git/blobdiff - vm/callstack.cpp
tools.scaffold: don't use sequences.extras.
[factor.git] / vm / callstack.cpp
index 103a7655476c64b8dd6f7d2bd85d3f009d211be6..2d183e802805ebbc88265bcc733c3055619c69e0 100644 (file)
@@ -46,10 +46,6 @@ void factor_vm::primitive_callstack_for() {
   ctx->replace(capture_callstack(other_ctx));
 }
 
-struct stack_frame_in_array {
-  cell cells[3];
-};
-
 // Allocates memory (frames.trim()), iterate_callstack_object()
 void factor_vm::primitive_callstack_to_array() {
   data_root<callstack> callstack(ctx->peek(), this);
@@ -60,6 +56,8 @@ void factor_vm::primitive_callstack_to_array() {
                                      cell size,
                                      code_block* owner,
                                      cell addr) {
+    (void)frame_top;
+    (void)size;
     data_root<object> executing_quot(owner->owner_quot(), this);
     data_root<object> executing(owner->owner, this);
     data_root<object> scan(owner->scan(this, addr), this);
@@ -70,10 +68,6 @@ void factor_vm::primitive_callstack_to_array() {
   };
   iterate_callstack_object(callstack.untagged(), stack_frame_accumulator);
 
-  // The callstack iterator visits frames in reverse order (top to bottom)
-  std::reverse((stack_frame_in_array*)frames.elements->data(),
-               (stack_frame_in_array*)(frames.elements->data() +
-                                       frames.count));
   frames.trim();
 
   ctx->replace(frames.elements.value());