VM: to_tenured_collector isn't needed, it's just a normal collector instance
parent
9bfc43144e
commit
685a795aa0
|
@ -10,8 +10,9 @@ void factor_vm::collect_aging() {
|
||||||
raised. */
|
raised. */
|
||||||
current_gc->op = collect_to_tenured_op;
|
current_gc->op = collect_to_tenured_op;
|
||||||
|
|
||||||
to_tenured_collector collector(this);
|
collector<tenured_space, to_tenured_policy> collector(this,
|
||||||
|
this->data->tenured,
|
||||||
|
to_tenured_policy(this));
|
||||||
gc_event* event = current_gc->event;
|
gc_event* event = current_gc->event;
|
||||||
|
|
||||||
if (event)
|
if (event)
|
||||||
|
|
|
@ -2,14 +2,11 @@
|
||||||
|
|
||||||
namespace factor {
|
namespace factor {
|
||||||
|
|
||||||
to_tenured_collector::to_tenured_collector(factor_vm* parent)
|
|
||||||
: collector<tenured_space, to_tenured_policy>(parent,
|
|
||||||
parent->data->tenured,
|
|
||||||
to_tenured_policy(parent)) {}
|
|
||||||
|
|
||||||
void factor_vm::collect_to_tenured() {
|
void factor_vm::collect_to_tenured() {
|
||||||
/* Copy live objects from aging space to tenured space. */
|
/* Copy live objects from aging space to tenured space. */
|
||||||
to_tenured_collector collector(this);
|
collector<tenured_space, to_tenured_policy> collector(this,
|
||||||
|
this->data->tenured,
|
||||||
|
to_tenured_policy(this));
|
||||||
|
|
||||||
mark_stack.clear();
|
mark_stack.clear();
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,4 @@ struct to_tenured_policy {
|
||||||
void visited_object(object* obj) {}
|
void visited_object(object* obj) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct to_tenured_collector : collector<tenured_space, to_tenured_policy> {
|
|
||||||
explicit to_tenured_collector(factor_vm* parent);
|
|
||||||
void tenure_reachable_objects();
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue