at.dms.kjc
Class AutoCloner

java.lang.Object
  extended by at.dms.kjc.AutoCloner

public class AutoCloner
extends Object


Constructor Summary
AutoCloner()
           
 
Method Summary
static void clear()
           
static Object cloneToplevel(Object o)
          This is the toplevel helper function for the automatic cloner.
static Object deepCopy(int offset, JBlock oldObj)
          Clone everything starting from this offset of the block Useful in BranchAnalyzer
static Object deepCopy(JPhylum oldObj)
          Deep copy a KJC structure -- this is the toplevel function to call.
static Object deepCopy(Kopi2SIR kopi2sir)
          Clone everything in a kopi2sir, useful for recursive stream definitions.
static Object deepCopy(SIRStream oldObj)
          Deep copy a stream structure.
static void register(Object oldObj, Object newObj)
          Indicate that
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoCloner

public AutoCloner()
Method Detail

clear

public static void clear()

deepCopy

public static Object deepCopy(SIRStream oldObj)
Deep copy a stream structure.


deepCopy

public static Object deepCopy(JPhylum oldObj)
Deep copy a KJC structure -- this is the toplevel function to call.


deepCopy

public static Object deepCopy(int offset,
                              JBlock oldObj)
Clone everything starting from this offset of the block Useful in BranchAnalyzer


deepCopy

public static Object deepCopy(Kopi2SIR kopi2sir)
Clone everything in a kopi2sir, useful for recursive stream definitions.


register

public static void register(Object oldObj,
                            Object newObj)
Indicate that
oldObj
is being cloned into
newObj
. All future references to
oldObj
should take
newObj
as the clone instead of creating yet another clone.


cloneToplevel

public static Object cloneToplevel(Object o)
This is the toplevel helper function for the automatic cloner. It should never be called directly by the user -- use deepCopy for that. This dictates the toplevel cloning policy, and is called on every field that is cloned.