]> gitweb.factorcode.org Git - factor.git/blob - vm/to_tenured_collector.hpp
VM: to_tenured_collector isn't needed, it's just a normal collector instance
[factor.git] / vm / to_tenured_collector.hpp
1 namespace factor {
2
3 struct to_tenured_policy {
4   factor_vm* parent;
5   tenured_space* tenured;
6
7   explicit to_tenured_policy(factor_vm* parent)
8       : parent(parent), tenured(parent->data->tenured) {}
9
10   bool should_copy_p(object* untagged) {
11     return !tenured->contains_p(untagged);
12   }
13
14   void promoted_object(object* obj) {
15     parent->mark_stack.push_back((cell)obj);
16   }
17
18   void visited_object(object* obj) {}
19 };
20
21 }