A technique is provided for reducing the number of write barriers executed
in mutator code without compromising garbage collector performance.
Advantageously, a compiler generates two forms of a mutator code--a first
version with write barriers and a second version substantially without
write barriers. In operation, the first version of the code may be
accessed by a vtable in a "mature" near-class and the second version may
be accessed by a vtable in a "nascent" near-class. According to the
invention, mapping of functionally equivalent points in the first and
second versions of the mutator code may be facilitated by an associated
pcmap. Further, each of the first and second versions may also be
associated with a respective nr_map that facilitates mapping functionally
equivalent points within different branches of guard code sequences
corresponding to reference-writes to non-receiver objects.