harpoon.Analysis.PreciseGC
Class WriteBarrierInserter

java.lang.Object
  extended by harpoon.Analysis.Transformation.MethodMutator
      extended by harpoon.Analysis.PreciseGC.WriteBarrierInserter
All Implemented Interfaces:
Serializable

public class WriteBarrierInserter
extends MethodMutator

WriteBarrierInserter takes code in Quad form and inserts write barriers for generational garbage collection. Write barriers are inserted before SETs of non-static Object and ASETs of Object arrays. The write barrier used is a call to a native implementation that may be replaced in later passes with a more efficient implementation.

Version:
$Id: WriteBarrierInserter.java,v 1.1 2002/06/25 18:16:22 kkz Exp $
Author:
Karen Zee <kkz@tmi.lcs.mit.edu>
See Also:
Serialized Form

Nested Class Summary
static class WriteBarrierInserter.DefaultWriteBarrierAnalysis
          DefaultWriteBarrierAnalysis returns a no- analysis WriteBarrierAnalysis Object that assumes write barriers are needed for all SET and ASETs of object fields.
static interface WriteBarrierInserter.WriteBarrierAnalysis
          A WriteBarrierAnalysis maps Codes to Sets of Quads for which write barriers have been deemed unnecessary.
 
Constructor Summary
WriteBarrierInserter(HCodeFactory parent, Linker linker)
          Creates a WriteBarrierInserter using a default no-analysis WriteBarrierAnalysis.
WriteBarrierInserter(HCodeFactory parent, Linker linker, WriteBarrierInserter.WriteBarrierAnalysis wba)
          Creates a WriteBarrierInserter.
 
Method Summary
protected  HCode mutateHCode(HCodeAndMaps input)
          Override this method to effect transformations on split methods.
 
Methods inherited from class harpoon.Analysis.Transformation.MethodMutator
cloneHCode, codeFactory, mutateCodeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WriteBarrierInserter

public WriteBarrierInserter(HCodeFactory parent,
                            Linker linker,
                            WriteBarrierInserter.WriteBarrierAnalysis wba)
Creates a WriteBarrierInserter.


WriteBarrierInserter

public WriteBarrierInserter(HCodeFactory parent,
                            Linker linker)
Creates a WriteBarrierInserter using a default no-analysis WriteBarrierAnalysis.

Method Detail

mutateHCode

protected HCode mutateHCode(HCodeAndMaps input)
Description copied from class: MethodMutator
Override this method to effect transformations on split methods.

Overrides:
mutateHCode in class MethodMutator