Patent ID: 7404182

Claim:
For employing a computer system to compile source code that specifies operation of a mutator, which includes at least one reference-modifying instruction, together with a garbage collector that relies on the mutator's execution of write-barrier code to keep track of at least some reference modifications, a method comprising: (A) deferring emission of write-barrier code corresponding to at least one reference-modifying instruction in the mutator by recording in a list a separate entry for each reference-modifying instruction whose write barrier emission has been deferred, wherein each list entry stores at least enough information to enable a write barrier to be generated for the entry's corresponding reference-modifying instruction; (B) combining or eliding one or more entries in the list if the one or more entries satisfy any elision criterion in a set of at least one elision criterion, each criterion being satisfied if the one or more entries correspond to reference-modifying instructions whose deferred write barriers, if executed, would provide unnecessary or redundant information to the garbage collector; and (C) emitting, at a predetermined point in the mutator, at least one deferred write barrier corresponding to a list entry that was not combined or elided.