]> gitweb.factorcode.org Git - factor.git/commitdiff
VM: Refactor copying_collector.hpp to Factor style
authorErik Charlebois <erikcharlebois@gmail.com>
Sun, 12 May 2013 01:53:30 +0000 (21:53 -0400)
committerErik Charlebois <erikcharlebois@gmail.com>
Sun, 12 May 2013 17:24:43 +0000 (13:24 -0400)
vm/copying_collector.hpp

index 89501a3a4ad2338d7b0f938328e8f1ecff4ecbcb..b4ff541d967968a418a268a8fda6e010aca9aba6 100644 (file)
@@ -1,21 +1,20 @@
-namespace factor
-{
+namespace factor {
 
-template<typename TargetGeneration, typename Policy>
-struct copying_collector : collector<TargetGeneration,Policy> {
-       cell scan;
+template <typename TargetGeneration, typename Policy>
+struct copying_collector : collector<TargetGeneration, Policy> {
+  cell scan;
 
-       explicit copying_collector(factor_vm *parent_, TargetGeneration *target_, Policy policy_) :
-               collector<TargetGeneration,Policy>(parent_,target_,policy_), scan(target_->here) {}
+  explicit copying_collector(factor_vm* parent_, TargetGeneration* target_,
+                             Policy policy_)
+      : collector<TargetGeneration, Policy>(parent_, target_, policy_),
+        scan(target_->here) {}
 
-       void cheneys_algorithm()
-       {
-               while(scan && scan < this->target->here)
-               {
-                       this->trace_object((object *)scan);
-                       scan = this->target->next_object_after(scan);
-               }
-       }
+  void cheneys_algorithm() {
+    while (scan && scan < this->target->here) {
+      this->trace_object((object*)scan);
+      scan = this->target->next_object_after(scan);
+    }
+  }
 };
 
 }