]> gitweb.factorcode.org Git - factor.git/commitdiff
VM: removing end_gc()
authorBjörn Lindqvist <bjourne@gmail.com>
Wed, 28 Sep 2016 03:22:32 +0000 (05:22 +0200)
committerBjörn Lindqvist <bjourne@gmail.com>
Wed, 28 Sep 2016 03:22:32 +0000 (05:22 +0200)
vm/gc.cpp
vm/vm.hpp

index 53465942c85f04d0d0d89026169b8f4a188ebbcf..0e9f18791a433926ff4adfb5e1267940cad64286 100644 (file)
--- a/vm/gc.cpp
+++ b/vm/gc.cpp
@@ -64,13 +64,6 @@ gc_state::~gc_state() {
   }
 }
 
-void factor_vm::end_gc() {
-  if (gc_events) {
-    current_gc->event->ended_gc(this);
-    gc_events->push_back(*current_gc->event);
-  }
-}
-
 void factor_vm::start_gc_again() {
   if (current_gc->op == collect_nursery_op) {
     // Nursery collection can fail if aging does not have enough
@@ -160,7 +153,10 @@ void factor_vm::gc(gc_op op, cell requested_size) {
     }
   }
 
-  end_gc();
+  if (gc_events) {
+    current_gc->event->ended_gc(this);
+    gc_events->push_back(*current_gc->event);
+  }
 
   atomic::store(&current_gc_p, false);
   if (ctx)
index 10de7ee2d6cb964a57b1c1cb26e3351014a11a66..1ff093c28dd10559fba8dc1cc96136d05972e5d1 100644 (file)
--- a/vm/vm.hpp
+++ b/vm/vm.hpp
@@ -338,7 +338,6 @@ struct factor_vm {
   void check_data_heap();
 
   // gc
-  void end_gc();
   void set_current_gc_op(gc_op op);
   void start_gc_again();
   void collect_nursery();