2009-05-04 02:46:13 -04:00
|
|
|
namespace factor
|
|
|
|
|
{
|
2009-09-25 21:32:00 -04:00
|
|
|
|
2009-10-06 02:42:17 -04:00
|
|
|
struct code_heap : heap {
|
2009-10-06 05:36:34 -04:00
|
|
|
/* Maps code blocks to the youngest generation containing
|
|
|
|
|
one of their literals. If this is tenured (0), the code block
|
|
|
|
|
is not part of the remembered set. */
|
|
|
|
|
unordered_map<code_block *, cell> remembered_set;
|
2009-10-06 02:42:17 -04:00
|
|
|
|
2009-10-06 05:36:34 -04:00
|
|
|
/* Minimum value in the above map. */
|
|
|
|
|
cell youngest_referenced_generation;
|
|
|
|
|
|
2009-10-06 02:42:17 -04:00
|
|
|
explicit code_heap(factor_vm *myvm, cell size);
|
2009-10-06 05:36:34 -04:00
|
|
|
void write_barrier(code_block *compiled);
|
|
|
|
|
void code_heap_free(code_block *compiled);
|
2009-10-03 09:47:05 -04:00
|
|
|
};
|
|
|
|
|
|
2009-05-04 02:46:13 -04:00
|
|
|
}
|