jbet
Class DagSnippit

java.lang.Object
  extended by jbet.DagSnippit

public class DagSnippit
extends java.lang.Object


Nested Class Summary
static class DagSnippit.Modifier
           
 
Field Summary
 java.util.Vector bbs
           
 int blflags
           
static java.lang.String JbetLogFacility
           
 DagMethodInfo method
           
 Node.param[] params
           
 
Constructor Summary
DagSnippit()
          constructor.
 
Method Summary
 BasicBlock blockAt(int i)
           
 void clearTmps()
          clearTmps sets clocal to -1 for each Node.
 void findLabels()
          Search for label nodes in all blocks.
 void findRoles()
          findRoles sets sb.es.role for each basic block
static DagSnippit graphify(MethodInfo mi)
          Convert one method's InstrBlocks to BasicBlocks.
static DagSnippit graphify(MethodInfo mi, ClassFilter fixcons)
          Convert one method's InstrBlocks to BasicBlocks.
static DagSnippit graphify(MethodInfo mi, ClassFilter fixcons, DagSnippit inme, int[] permutation)
           
 void printinfo(LineWriter out)
          Display a DAG on the output stream
 void replace_cfe(java.util.Hashtable subs, Node.SubMethod sm)
           
 void replace(java.util.Hashtable subs, Node.SubMethod sm)
          replace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JbetLogFacility

public static java.lang.String JbetLogFacility

bbs

public java.util.Vector bbs

method

public DagMethodInfo method

params

public Node.param[] params

blflags

public int blflags
Constructor Detail

DagSnippit

public DagSnippit()
constructor.

Method Detail

blockAt

public BasicBlock blockAt(int i)

graphify

public static DagSnippit graphify(MethodInfo mi)
                           throws ClassFileException,
                                  DataFlowException,
                                  ElementNotFoundException
Convert one method's InstrBlocks to BasicBlocks. Linking outputs of a block to inputs of its successors is also done here.

Parameters:
mi - The method to convert
Returns:
DAG representing the method
Throws:
ClassFileException
DataFlowException
ElementNotFoundException

graphify

public static DagSnippit graphify(MethodInfo mi,
                                  ClassFilter fixcons)
                           throws ClassFileException,
                                  DataFlowException,
                                  ElementNotFoundException
Convert one method's InstrBlocks to BasicBlocks. Linking outputs of a block to inputs of its successors is also done here.

Parameters:
mi - The method to graphify
fixcons - Function that says whether to replace new with invokeinit
Returns:
DAG representing the method
Throws:
ClassFileException
DataFlowException
ElementNotFoundException

graphify

public static DagSnippit graphify(MethodInfo mi,
                                  ClassFilter fixcons,
                                  DagSnippit inme,
                                  int[] permutation)
                           throws ClassFileException,
                                  DataFlowException,
                                  ElementNotFoundException
Throws:
ClassFileException
DataFlowException
ElementNotFoundException

printinfo

public void printinfo(LineWriter out)
Display a DAG on the output stream

Parameters:
out - stream to write on

replace

public void replace(java.util.Hashtable subs,
                    Node.SubMethod sm)
             throws java.lang.Throwable
replace

Parameters:
subs -
sm -
Throws:
java.lang.Throwable

replace_cfe

public void replace_cfe(java.util.Hashtable subs,
                        Node.SubMethod sm)
                 throws ClassFileException
Throws:
ClassFileException

findLabels

public void findLabels()
Search for label nodes in all blocks. Put label placeholder blocks into bbs for each label found. The block numbers of other blocks may be changed.


clearTmps

public void clearTmps()
clearTmps sets clocal to -1 for each Node. (doesn't seem to be called)


findRoles

public void findRoles()
findRoles sets sb.es.role for each basic block