]> gitweb.factorcode.org Git - factor.git/blobdiff - vm/gc.cpp
vm: replace assert with FACTOR_ASSERT
[factor.git] / vm / gc.cpp
index 5ea23dce3bb96dd647e652c4bb8a18b4e1aaae32..177bb970afa91fad80393cc668fa71b13236187a 100755 (executable)
--- a/vm/gc.cpp
+++ b/vm/gc.cpp
@@ -145,14 +145,14 @@ void factor_vm::set_current_gc_op(gc_op op)
 
 void factor_vm::gc(gc_op op, cell requested_size, bool trace_contexts_p)
 {
-       assert(!gc_off);
-       assert(!current_gc);
+       FACTOR_ASSERT(!gc_off);
+       FACTOR_ASSERT(!current_gc);
 
        /* Important invariant: tenured space must have enough contiguous free
        space to fit the entire contents of the aging space and nursery. This is
        because when doing a full collection, objects from younger generations
        are promoted before any unreachable tenured objects are freed. */
-       assert(!data->high_fragmentation_p());
+       FACTOR_ASSERT(!data->high_fragmentation_p());
 
        current_gc = new gc_state(op,this);
        atomic::store(&current_gc_p, true);
@@ -223,7 +223,7 @@ void factor_vm::gc(gc_op op, cell requested_size, bool trace_contexts_p)
        current_gc = NULL;
 
        /* Check the invariant again, just in case. */
-       assert(!data->high_fragmentation_p());
+       FACTOR_ASSERT(!data->high_fragmentation_p());
 }
 
 /* primitive_minor_gc() is invoked by inline GC checks, and it needs to fill in
@@ -246,7 +246,7 @@ struct call_frame_scrubber {
                code_block *compiled = parent->frame_code(frame);
                gc_info *info = compiled->block_gc_info();
 
-               assert(return_address < compiled->size());
+               FACTOR_ASSERT(return_address < compiled->size());
                cell index = info->return_address_index(return_address);
                if(index != (cell)-1)
                        ctx->scrub_stacks(info,index);