harpoon.IR.Tree
Class TreeUseDefer

java.lang.Object
  extended by harpoon.IR.Properties.UseDefer<Tree>
      extended by harpoon.IR.Tree.TreeUseDefer

public class TreeUseDefer
extends UseDefer<Tree>

TreeUseDefer implements the Properties.UseDefer interface for non-SEQ Stms of a tree.

Version:
$Id: TreeUseDefer.java,v 1.5 2004/02/08 01:55:51 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Field Summary
 
Fields inherited from class harpoon.IR.Properties.UseDefer
DEFAULT
 
Constructor Summary
TreeUseDefer(Code code)
          Creates a UseDefer.
 
Method Summary
 Collection<Temp> defC(Tree tree)
          Returns a collection of Temps defined by hce.
 Collection<Temp> useC(Tree hce)
          Returns a collection of Temps which are used by the statement/expression subtree rooted at hce.
 
Methods inherited from class harpoon.IR.Properties.UseDefer
def, use
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeUseDefer

public TreeUseDefer(Code code)
Creates a UseDefer.

Method Detail

defC

public Collection<Temp> defC(Tree tree)
Returns a collection of Temps defined by hce.

The only Tree.Trees which define Temps are CALL, NATIVECALL, METHOD, and MOVE when the destination expression is a TEMP. For all other elements, this method returns a zero-element collection.

Specified by:
defC in class UseDefer<Tree>

useC

public Collection<Temp> useC(Tree hce)
Returns a collection of Temps which are used by the statement/expression subtree rooted at hce.

Specified by:
useC in class UseDefer<Tree>