public class SSACFG.BasicBlock extends Object implements ISSABasicBlock
Constructor and Description |
---|
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() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public int getNumber()
IBasicBlock
getNumber
in interface IBasicBlock<SSAInstruction>
public int getFirstInstructionIndex()
getFirstInstructionIndex
in interface IBasicBlock<SSAInstruction>
public boolean isCatchBlock()
isCatchBlock
in interface IBasicBlock<SSAInstruction>
isCatchBlock
in interface ISSABasicBlock
public int getLastInstructionIndex()
IBasicBlock
getLastInstructionIndex
in interface IBasicBlock<SSAInstruction>
public Iterator<SSAPhiInstruction> iteratePhis()
iteratePhis
in interface ISSABasicBlock
public 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 instructionpublic Iterator<SSAPiInstruction> iteratePis()
iteratePis
in interface ISSABasicBlock
public 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.INodeWithNumber
public void setGraphNodeId(int number)
setGraphNodeId
in interface com.ibm.wala.util.graph.INodeWithNumber
public IMethod getMethod()
getMethod
in interface IBasicBlock<SSAInstruction>
public boolean isExitBlock()
ISSABasicBlock
ControlFlowGraph
?isExitBlock
in interface IBasicBlock<SSAInstruction>
isExitBlock
in interface ISSABasicBlock
public boolean isEntryBlock()
ISSABasicBlock
ControlFlowGraph
isEntryBlock
in interface IBasicBlock<SSAInstruction>
isEntryBlock
in interface ISSABasicBlock
public SSAInstruction getLastInstruction()
getLastInstruction
in interface ISSABasicBlock
public Iterator<TypeReference> getCaughtExceptionTypes()
SSACFG.ExceptionHandlerBasicBlock
subclass will override this.getCaughtExceptionTypes
in interface ISSABasicBlock
Copyright © 2019. All rights reserved.