An approach is provided for maintaining a write barrier during an assignment
operation
between a source object and a target object. A source tag is obtained from a first
reference to the source object, and a target tag is obtained from a second reference
to the target object. The source tag and the target tag are compared, such that
if the source tag is in a predetermined relationship with the target tag, then
a data structure (e.g., a remember table or exit table) associated with the write
barrier is updated in accordance with the assignment operation. In one embodiment,
the routine to update the data structure is dispatched from a function table based
on a tag value in a header associated with the source object.