2013-05-11 21:39:48 -04:00
|
|
|
namespace factor {
|
2009-10-07 16:48:09 -04:00
|
|
|
|
|
|
|
struct aging_policy {
|
2013-05-11 21:39:48 -04:00
|
|
|
factor_vm* parent;
|
|
|
|
aging_space* aging;
|
|
|
|
tenured_space* tenured;
|
2009-10-07 16:48:09 -04:00
|
|
|
|
2013-05-12 23:20:43 -04:00
|
|
|
explicit aging_policy(factor_vm* parent)
|
|
|
|
: parent(parent),
|
2013-05-11 21:39:48 -04:00
|
|
|
aging(parent->data->aging),
|
|
|
|
tenured(parent->data->tenured) {}
|
2009-10-07 16:48:09 -04:00
|
|
|
|
2013-05-11 21:39:48 -04:00
|
|
|
bool should_copy_p(object* untagged) {
|
|
|
|
return !(aging->contains_p(untagged) || tenured->contains_p(untagged));
|
|
|
|
}
|
2009-10-20 23:20:49 -04:00
|
|
|
|
2013-05-11 21:39:48 -04:00
|
|
|
void promoted_object(object* obj) {}
|
2009-10-20 23:20:49 -04:00
|
|
|
|
2013-05-11 21:39:48 -04:00
|
|
|
void visited_object(object* obj) {}
|
2009-10-07 16:48:09 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|