jbet
Class BasicBlock

java.lang.Object
  extended by jbet.Block
      extended by jbet.BasicBlock

public class BasicBlock
extends Block


Nested Class Summary
 
Nested classes/interfaces inherited from class jbet.Block
Block.ExcInfo, Block.ExitRec
 
Field Summary
 java.util.Vector alternates
           
 java.lang.String bname
           
 AliasDB db
           
 Node[] esnodes
           
 java.lang.String handler
           
 Node.var[] inputs
           
static java.lang.String JbetLogFacility
           
 Node[] outputs
           
 InternSet senodes
           
 Node.cint swvaln
           
 
Fields inherited from class jbet.Block
Blc_const, Blc_disabled, Blc_flags, Blc_idempotent, Blc_indet, Blc_NoAlias, blflags, En_flags, En_jsr, enflags, Erol_Cond, Erol_LoopCond, Erol_names, Erol_Single, Erol_Special, Erol_Switch, Erol_Unknown, es, Exit_DoubleCons, Exit_flags, Exit_NewFrame, Exit_swap, swval
 
Constructor Summary
BasicBlock()
           
BasicBlock(InstrBlock in)
          Constructs a BasicBlock from an InstrBlock.
BasicBlock(InstrBlock in, ClassFilter fixcons)
          Constructs a BasicBlock from in.
BasicBlock(int numin, int numou, int numes)
           
 
Method Summary
 void addAlternate(BasicBlock other)
           
 void addExnode(Node ex)
           
 void addOutput(Node ex)
           
 BasicBlock any(java.util.Random values)
           
 java.util.Collection findnodes()
          Find all used nodes.
static BasicBlock partialCopy(BasicBlock bb)
          Partial copy "constructor" Called by DagRep.obfuscate on each BasicBlock of a method.
 void printinfo(LineWriter out, boolean printcode)
          Display a block on the output stream.
 void replace_cfe(java.util.Hashtable subs, Node.SubMethod sm)
           
 void replace(java.util.Hashtable subs, Node.SubMethod sm)
           
 void replacees(java.util.Vector newes)
           
 void setGotoBlk(Node n)
           
 BasicBlock split()
           
 BasicBlock splitInHalf()
           
 
Methods inherited from class jbet.Block
getSuccessors, getSuccessors, getSuccessors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inputs

public Node.var[] inputs

outputs

public Node[] outputs

senodes

public InternSet senodes

handler

public java.lang.String handler

db

public AliasDB db

esnodes

public Node[] esnodes

bname

public java.lang.String bname

alternates

public java.util.Vector alternates

swvaln

public Node.cint swvaln

JbetLogFacility

public static java.lang.String JbetLogFacility
Constructor Detail

BasicBlock

public BasicBlock()

BasicBlock

public BasicBlock(int numin,
                  int numou,
                  int numes)

BasicBlock

public BasicBlock(InstrBlock in)
Constructs a BasicBlock from an InstrBlock.

Parameters:
in - input InstrBlock

BasicBlock

public BasicBlock(InstrBlock in,
                  ClassFilter fixcons)
Constructs a BasicBlock from in.

Parameters:
in - input
stacknum - just an integer that is used to keep the var.v fields for stack-input nodes unique
fixcons - Classes for which invokeinits should replace news
Method Detail

splitInHalf

public BasicBlock splitInHalf()

partialCopy

public static BasicBlock partialCopy(BasicBlock bb)
Partial copy "constructor" Called by DagRep.obfuscate on each BasicBlock of a method.

Parameters:
bb - an input BasicBlock
Returns:
a copy of the input, with no Nodes

findnodes

public java.util.Collection findnodes()
Find all used nodes. visit all nodes in the block whose value is used.

Returns:
a Collection of Nodes, that one can access by making an iterator over.

any

public BasicBlock any(java.util.Random values)

addAlternate

public void addAlternate(BasicBlock other)

split

public BasicBlock split()

printinfo

public void printinfo(LineWriter out,
                      boolean printcode)
Display a block on the output stream.

Overrides:
printinfo in class Block
Parameters:
out - stream to write
printcode - true to print the code

replacees

public void replacees(java.util.Vector newes)

setGotoBlk

public void setGotoBlk(Node n)

replace

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

replace_cfe

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

addExnode

public void addExnode(Node ex)

addOutput

public void addOutput(Node ex)