3 We need to have a write barrier that performs checks whenever a reference
4 is written. This allows the new generation to collected without collecting
5 the old generation too.
7 The idea is that if +target+ is on object in the old generation, and +val+
8 is an object in the new generation, we need to add +target+ to the remember
9 set of new generation so that when we go to collect the new generation,
10 we are sure that +val+ survives.
12 The flag is so that we don't put the object into the remember set
17 /* TODO: This routine MUST be optimized because it's hit constantly. */
21 static inline void object_memory_write_barrier(object_memory om
, OBJECT target
, OBJECT val
) {
23 if(!REFERENCE_P(val
)) return;
30 xassert(val
->klass
!= Qnil
);
32 /* if the target is in a higher numbered zone than val, then
33 that means it needs to be in the remember set. */
35 object_memory_update_rs(om
, target
, val
);