From 685a795aa038975c73b4c2db90051f49ab2a89ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Sun, 3 May 2015 17:51:51 +0200 Subject: [PATCH] VM: to_tenured_collector isn't needed, it's just a normal collector instance --- vm/aging_collector.cpp | 5 +++-- vm/to_tenured_collector.cpp | 9 +++------ vm/to_tenured_collector.hpp | 5 ----- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/vm/aging_collector.cpp b/vm/aging_collector.cpp index 92b7f1fffb..cd6b031383 100644 --- a/vm/aging_collector.cpp +++ b/vm/aging_collector.cpp @@ -10,8 +10,9 @@ void factor_vm::collect_aging() { raised. */ current_gc->op = collect_to_tenured_op; - to_tenured_collector collector(this); - + collector collector(this, + this->data->tenured, + to_tenured_policy(this)); gc_event* event = current_gc->event; if (event) diff --git a/vm/to_tenured_collector.cpp b/vm/to_tenured_collector.cpp index 3a8fd52ddb..12b871a826 100644 --- a/vm/to_tenured_collector.cpp +++ b/vm/to_tenured_collector.cpp @@ -2,14 +2,11 @@ namespace factor { -to_tenured_collector::to_tenured_collector(factor_vm* parent) - : collector(parent, - parent->data->tenured, - to_tenured_policy(parent)) {} - void factor_vm::collect_to_tenured() { /* Copy live objects from aging space to tenured space. */ - to_tenured_collector collector(this); + collector collector(this, + this->data->tenured, + to_tenured_policy(this)); mark_stack.clear(); diff --git a/vm/to_tenured_collector.hpp b/vm/to_tenured_collector.hpp index 4198480659..30beb8cb54 100644 --- a/vm/to_tenured_collector.hpp +++ b/vm/to_tenured_collector.hpp @@ -18,9 +18,4 @@ struct to_tenured_policy { void visited_object(object* obj) {} }; -struct to_tenured_collector : collector { - explicit to_tenured_collector(factor_vm* parent); - void tenure_reachable_objects(); -}; - }