harpoon.Analysis.Quads
Class DispatchTreeTransformation

java.lang.Object
  extended by harpoon.Analysis.Transformation.MethodMutator
      extended by harpoon.Analysis.Quads.DispatchTreeTransformation
All Implemented Interfaces:
Serializable

public class DispatchTreeTransformation
extends MethodMutator

DispatchTreeTransformation replaces dynamic dispatch call sites with TYPESWITCHes leading to static dispatch calls. Given proper optimization of the TYPESWITCH test, this should speed up dispatch.

Version:
$Id: DispatchTreeTransformation.java,v 1.5 2004/02/08 05:09:40 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
Serialized Form

Constructor Summary
DispatchTreeTransformation(HCodeFactory parent, ClassHierarchy ch)
          Creates a DispatchTreeTransformation.
 
Method Summary
protected  HCodeAndMaps cloneHCode(HCode hc, HMethod newmethod)
          Override this method if you do not want the mutatable HCode to be a straight clone of the original HCode: for example, if the input HCodes were QuadSSI and you wanted to clone them into QuadRSSIs before mutating.
protected  String mutateCodeName(String codeName)
          Override this method to change the codename which this MethodMutator's codefactory reports.
protected  HCode mutateHCode(HCodeAndMaps input)
          Override this method to effect transformations on split methods.
 
Methods inherited from class harpoon.Analysis.Transformation.MethodMutator
codeFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DispatchTreeTransformation

public DispatchTreeTransformation(HCodeFactory parent,
                                  ClassHierarchy ch)
Creates a DispatchTreeTransformation.

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

cloneHCode

protected HCodeAndMaps cloneHCode(HCode hc,
                                  HMethod newmethod)
Description copied from class: MethodMutator
Override this method if you do not want the mutatable HCode to be a straight clone of the original HCode: for example, if the input HCodes were QuadSSI and you wanted to clone them into QuadRSSIs before mutating. By default, this method returns hc.clone(newmethod).

Overrides:
cloneHCode in class MethodMutator

mutateCodeName

protected String mutateCodeName(String codeName)
Description copied from class: MethodMutator
Override this method to change the codename which this MethodMutator's codefactory reports.

Overrides:
mutateCodeName in class MethodMutator