]> gitweb.factorcode.org Git - factor.git/commitdiff
vm: fix formatting
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Fri, 9 Oct 2009 07:57:04 +0000 (02:57 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Fri, 9 Oct 2009 07:57:04 +0000 (02:57 -0500)
vm/gc.cpp

index a435e5f465aa354e2a86bda83acfbbc75cf62a61..3850dc642ecd3a979013c1d8ee81acf759d06ad4 100755 (executable)
--- a/vm/gc.cpp
+++ b/vm/gc.cpp
@@ -67,36 +67,37 @@ void factor_vm::garbage_collection(cell collecting_gen_, bool growing_data_heap_
 
        /* Keep trying to GC higher and higher generations until we don't run out
        of space */
-        if(setjmp(current_gc->gc_unwind))
-        {
-                /* We come back here if a generation is full */
-
-                /* We have no older generations we can try collecting, so we
-                resort to growing the data heap */
-                if(current_gc->collecting_tenured_p())
-                {
-                        current_gc->growing_data_heap = true;
-
-                        /* see the comment in unmark_marked() */
-                        code->unmark_marked();
-                }
-                /* we try collecting aging space twice before going on to
-                collect tenured */
-                else if(current_gc->collecting_aging_p()
-                        && !current_gc->collecting_aging_again)
-                {
-                        current_gc->collecting_aging_again = true;
-                }
-                /* Collect the next oldest generation */
-                else
-                {
-                        current_gc->collecting_gen++;
-                }
-        }
-
-        if(current_gc->collecting_nursery_p())
-               collect_nursery();
-        else if(current_gc->collecting_aging_p())
+       if(setjmp(current_gc->gc_unwind))
+       {
+               /* We come back here if a generation is full */
+
+               /* We have no older generations we can try collecting, so we
+               resort to growing the data heap */
+               if(current_gc->collecting_tenured_p())
+               {
+                       current_gc->growing_data_heap = true;
+
+                       /* Since we start tracing again, any previously
+                       marked code blocks must be re-marked and re-traced */
+                       code->clear_mark_bits();
+               }
+               /* we try collecting aging space twice before going on to
+               collect tenured */
+               else if(current_gc->collecting_aging_p()
+                       && !current_gc->collecting_aging_again)
+               {
+                       current_gc->collecting_aging_again = true;
+               }
+               /* Collect the next oldest generation */
+               else
+               {
+                       current_gc->collecting_gen++;
+               }
+       }
+
+       if(current_gc->collecting_nursery_p())
+               collect_nursery();
+       else if(current_gc->collecting_aging_p())
        {
                if(current_gc->collecting_aging_again)
                        collect_to_tenured();