}
cell next_object_after(cell scan) {
- cell dsize = ((object*)scan)->size();
- if (scan + dsize < here)
- return scan + dsize;
+ cell data_size = ((object*)scan)->size();
+ if (scan + data_size < here)
+ return scan + data_size;
return 0;
}
inline object* factor_vm::allot_object(cell type, cell size) {
FACTOR_ASSERT(!current_gc);
- bump_allocator *dnursery = data->nursery;
+ bump_allocator *data_nursery = data->nursery;
// If the object is bigger than the nursery, allocate it in tenured space
- if (size >= dnursery->size)
+ if (size >= data_nursery->size)
return allot_large_object(type, size);
// If the object is smaller than the nursery, allocate it in the nursery,
// after a GC if needed
- if (dnursery->here + size > dnursery->end)
+ if (data_nursery->here + size > data_nursery->end)
primitive_minor_gc();
- object* obj = dnursery->allot(size);
+ object* obj = data_nursery->allot(size);
obj->initialize(type);
return obj;
return (cell)obj >= start && (cell)obj < end;
}
- object* allot(cell dsize) {
+ object* allot(cell data_size) {
cell h = here;
- here = h + align(dsize, data_alignment);
+ here = h + align(data_size, data_alignment);
return (object*)h;
}
return (bits[position.first] & ((cell)1 << position.second)) != 0;
}
- void set_bitmap_range(cell* bits, const cell address, const cell dsize) {
- std::pair<cell, cell> bstart = bitmap_deref(address);
- std::pair<cell, cell> end = bitmap_deref(address + dsize);
+ void set_bitmap_range(cell* bits, const cell address, const cell data_size) {
+ std::pair<cell, cell> bitmap_start = bitmap_deref(address);
+ std::pair<cell, cell> end = bitmap_deref(address + data_size);
- cell start_mask = ((cell)1 << bstart.second) - 1;
+ cell start_mask = ((cell)1 << bitmap_start.second) - 1;
cell end_mask = ((cell)1 << end.second) - 1;
- if (bstart.first == end.first)
- bits[bstart.first] |= start_mask ^ end_mask;
+ if (bitmap_start.first == end.first)
+ bits[bitmap_start.first] |= start_mask ^ end_mask;
else {
- FACTOR_ASSERT(bstart.first < bits_size);
- bits[bstart.first] |= ~start_mask;
+ FACTOR_ASSERT(bitmap_start.first < bits_size);
+ bits[bitmap_start.first] |= ~start_mask;
- for (cell index = bstart.first + 1; index < end.first; index++)
+ for (cell index = bitmap_start.first + 1; index < end.first; index++)
bits[index] = (cell)-1;
if (end_mask != 0) {
}
cell next_object_after(cell scan) {
- cell dsize = ((object*)scan)->size();
- return next_allocated_object_after(scan + dsize);
+ cell data_size = ((object*)scan)->size();
+ return next_allocated_object_after(scan + data_size);
}
void sweep() {