From 0cf7feba0bb29d9aa8db32c9af89e317a45e5d27 Mon Sep 17 00:00:00 2001 From: Erik Charlebois Date: Sat, 11 May 2013 21:53:30 -0400 Subject: [PATCH] VM: Refactor copying_collector.hpp to Factor style --- vm/copying_collector.hpp | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/vm/copying_collector.hpp b/vm/copying_collector.hpp index 89501a3a4a..b4ff541d96 100644 --- a/vm/copying_collector.hpp +++ b/vm/copying_collector.hpp @@ -1,21 +1,20 @@ -namespace factor -{ +namespace factor { -template -struct copying_collector : collector { - cell scan; +template +struct copying_collector : collector { + cell scan; - explicit copying_collector(factor_vm *parent_, TargetGeneration *target_, Policy policy_) : - collector(parent_,target_,policy_), scan(target_->here) {} + explicit copying_collector(factor_vm* parent_, TargetGeneration* target_, + Policy policy_) + : collector(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); + } + } }; } -- 2.34.1