harpoon.Analysis.PreciseGC
Class RCTransformer

java.lang.Object
  extended by harpoon.Analysis.Transformation.MethodSplitter
      extended by harpoon.Analysis.PreciseGC.RCTransformer
All Implemented Interfaces:
Serializable

public class RCTransformer
extends MethodSplitter

RCTransformer transforms recursive constructors that build their data structures in a top-down fashion into methods that build their data structures in a bottom-up fashion. Also transforms the callers of these methods.

Version:
$Id: RCTransformer.java,v 1.5 2004/02/08 03:20:07 cananian Exp $
Author:
Karen Zee <kkz@tmi.lcs.mit.edu>
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class harpoon.Analysis.Transformation.MethodSplitter
MethodSplitter.Token
 
Field Summary
static MethodSplitter.Token CREATOR
          The CREATOR token represents the transformed version of the method.
 
Fields inherited from class harpoon.Analysis.Transformation.MethodSplitter
ORIGINAL
 
Constructor Summary
RCTransformer(HCodeFactory parent, ClassHierarchy ch, Linker lnkr)
          Creates a RCTransformer.
 
Method Summary
protected  boolean isValidToken(MethodSplitter.Token which)
          Check the validity of a given MethodSplitter.Token.
protected  String mutateDescriptor(HMethod hm, MethodSplitter.Token which)
          Mutated constructors have signatures differing from the original.
protected  HCode mutateHCode(HCodeAndMaps input, MethodSplitter.Token which)
          Modifies two classes of methods: - mutates recursive constructors into "creators", methods that build objects in a bottom-up fashion - modifies callers of these constructors to call the new creator methods
 
Methods inherited from class harpoon.Analysis.Transformation.MethodSplitter
cloneHCode, codeFactory, isVirtual, mutateCodeName, select
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CREATOR

public static final MethodSplitter.Token CREATOR
The CREATOR token represents the transformed version of the method.

Constructor Detail

RCTransformer

public RCTransformer(HCodeFactory parent,
                     ClassHierarchy ch,
                     Linker lnkr)
Creates a RCTransformer.

Method Detail

mutateDescriptor

protected String mutateDescriptor(HMethod hm,
                                  MethodSplitter.Token which)
Mutated constructors have signatures differing from the original.

Overrides:
mutateDescriptor in class MethodSplitter

mutateHCode

protected HCode mutateHCode(HCodeAndMaps input,
                            MethodSplitter.Token which)
Modifies two classes of methods: - mutates recursive constructors into "creators", methods that build objects in a bottom-up fashion - modifies callers of these constructors to call the new creator methods

Overrides:
mutateHCode in class MethodSplitter

isValidToken

protected boolean isValidToken(MethodSplitter.Token which)
Check the validity of a given MethodSplitter.Token.

Overrides:
isValidToken in class MethodSplitter