4 uint32_t scrub_d_count;
5 uint32_t scrub_r_count;
6 uint32_t gc_root_count;
7 uint32_t derived_root_count;
8 uint32_t return_address_count;
10 cell callsite_bitmap_size() {
11 return scrub_d_count + scrub_r_count + gc_root_count;
14 cell total_bitmap_size() {
15 return return_address_count * callsite_bitmap_size();
18 cell total_bitmap_bytes() { return ((total_bitmap_size() + 7) / 8); }
20 uint32_t* return_addresses() {
21 return (uint32_t*)this - return_address_count;
24 uint32_t* base_pointer_map() {
25 return return_addresses() - return_address_count * derived_root_count;
28 uint8_t* gc_info_bitmap() {
29 return (uint8_t*)base_pointer_map() - total_bitmap_bytes();
32 cell callsite_scrub_d(cell index) { return index * scrub_d_count; }
34 cell callsite_scrub_r(cell index) {
35 return return_address_count * scrub_d_count + index * scrub_r_count;
38 cell callsite_gc_roots(cell index) {
39 return return_address_count * scrub_d_count +
40 return_address_count * scrub_r_count + index * gc_root_count;
43 uint32_t lookup_base_pointer(cell index, cell derived_root) {
44 return base_pointer_map()[index * derived_root_count + derived_root];
47 cell return_address_index(cell return_address);