public class SSACFG.BasicBlock extends Object implements ISSABasicBlock
| Constructor and Description |
|---|
SSACFG.BasicBlock(int number) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPhiForLocal(int n,
SSAPhiInstruction phi) |
void |
addPhiForStackSlot(int slot,
SSAPhiInstruction phi) |
void |
addPiForRefAndPath(int n,
Object path,
SSAPiInstruction pi) |
boolean |
equals(Object arg0) |
List<SSAInstruction> |
getAllInstructions()
TODO: make this more efficient if needed
|
Iterator<TypeReference> |
getCaughtExceptionTypes()
The
SSACFG.ExceptionHandlerBasicBlock subclass will override this. |
int |
getFirstInstructionIndex()
Method getFirstInstructionIndex.
|
int |
getGraphNodeId() |
SSAInstruction |
getLastInstruction() |
int |
getLastInstructionIndex()
Get the index of the last instruction in the basic block.
|
IMethod |
getMethod() |
int |
getNumber()
Each basic block should have a unique number in its cfg
|
SSAPhiInstruction |
getPhiForLocal(int n)
This method is used during SSA construction.
|
SSAPhiInstruction |
getPhiForStackSlot(int slot)
This method is used during SSA construction.
|
SSAPiInstruction |
getPiForRefAndPath(int n,
Object path) |
int |
hashCode() |
boolean |
hasPhi() |
boolean |
isCatchBlock()
Is this block marked as a catch block?
|
boolean |
isEntryBlock()
Does this block represent the unique entry to a
ControlFlowGraph |
boolean |
isExitBlock()
Does this block represent the unique exit from a
ControlFlowGraph? |
Iterator<SSAInstruction> |
iterateNormalInstructions() |
Iterator<SSAPhiInstruction> |
iteratePhis() |
Iterator<SSAPiInstruction> |
iteratePis() |
Iterator<SSAInstruction> |
iterator() |
void |
removePhis(Set<SSAPhiInstruction> toRemove)
Remove any phis in the set.
|
void |
setGraphNodeId(int number) |
String |
toString() |
public int getNumber()
IBasicBlockgetNumber in interface IBasicBlock<SSAInstruction>public int getFirstInstructionIndex()
getFirstInstructionIndex in interface IBasicBlock<SSAInstruction>public boolean isCatchBlock()
isCatchBlock in interface IBasicBlock<SSAInstruction>isCatchBlock in interface ISSABasicBlockpublic int getLastInstructionIndex()
IBasicBlockgetLastInstructionIndex in interface IBasicBlock<SSAInstruction>public Iterator<SSAPhiInstruction> iteratePhis()
iteratePhis in interface ISSABasicBlockpublic SSAPhiInstruction getPhiForStackSlot(int slot)
public SSAPhiInstruction getPhiForLocal(int n)
public void addPhiForStackSlot(int slot,
SSAPhiInstruction phi)
public void addPhiForLocal(int n,
SSAPhiInstruction phi)
public void removePhis(Set<SSAPhiInstruction> toRemove)
public SSAPiInstruction getPiForRefAndPath(int n, Object path)
public void addPiForRefAndPath(int n,
Object path,
SSAPiInstruction pi)
n - can be the val in the pi instructionpath - can be the successor block in the pi instructionpi - public Iterator<SSAPiInstruction> iteratePis()
iteratePis in interface ISSABasicBlockpublic Iterator<SSAInstruction> iterateNormalInstructions()
public List<SSAInstruction> getAllInstructions()
public Iterator<SSAInstruction> iterator()
iterator in interface Iterable<SSAInstruction>public boolean hasPhi()
public int getGraphNodeId()
getGraphNodeId in interface com.ibm.wala.util.graph.INodeWithNumberpublic void setGraphNodeId(int number)
setGraphNodeId in interface com.ibm.wala.util.graph.INodeWithNumberpublic String toString()
toString in class ObjectObject.toString()public IMethod getMethod()
getMethod in interface IBasicBlock<SSAInstruction>public boolean isExitBlock()
ISSABasicBlockControlFlowGraph?isExitBlock in interface IBasicBlock<SSAInstruction>isExitBlock in interface ISSABasicBlockpublic boolean isEntryBlock()
ISSABasicBlockControlFlowGraphisEntryBlock in interface IBasicBlock<SSAInstruction>isEntryBlock in interface ISSABasicBlockpublic SSAInstruction getLastInstruction()
getLastInstruction in interface ISSABasicBlockpublic Iterator<TypeReference> getCaughtExceptionTypes()
SSACFG.ExceptionHandlerBasicBlock subclass will override this.getCaughtExceptionTypes in interface ISSABasicBlockISSABasicBlock.getCaughtExceptionTypes()Copyright © 2015. All rights reserved.