slavapestov/factor — pull request #1208 by bjourne (2014-11-21 08:28:53+00:00)
Title: Nursery and each_object

This pr addresses two bugs which were kind of tangled to each other.

First, there where two nursery objects in the vm, one in vm->data->nursery and another in vm.nursery. The point (haha) was probably that they should reference the same instance. But they didn't so I fixed that by making vm->data->nursery point to vm.nursery. Previously vm->data->nursery->occupied_space() was always 0 which was a bug.

Then each object_started() crashing because it tried to iterate the objects in the nursery. Turns out you can't do that because reallot_array() and reallot_string() can introduce gaps between the objects. Those gaps cause next_object_after() in bump_allocator to return bogus addresses. The fix for that was to ensure the objects in nursery was collected to aging before iterating the heap.