private class ControlFlowGraph.InstructionContextImpl extends Object implements InstructionContext
| Modifier and Type | Field and Description |
|---|---|
private ArrayList |
executionPredecessors
The 'execution predecessors' - a list of type InstructionContext
of those instances that have been execute()d before in that order.
|
private Map |
inFrames
The 'incoming' execution Frames.
|
private InstructionHandle |
instruction
The InstructionHandle this InstructionContext is wrapped around.
|
private Map |
outFrames
The 'outgoing' execution Frames.
|
private int |
TAG
The TAG field is here for external temporary flagging, such
as graph colouring.
|
| Constructor and Description |
|---|
ControlFlowGraph.InstructionContextImpl(InstructionHandle inst)
Creates an InstructionHandleImpl object from an InstructionHandle.
|
| Modifier and Type | Method and Description |
|---|---|
private InstructionHandle[] |
_getSuccessors()
A utility method that calculates the successors of a given InstructionHandle
That means, a RET does have successors as defined here.
|
boolean |
execute(Frame inFrame,
ArrayList execPreds,
InstConstraintVisitor icv,
ExecutionVisitor ev)
"Merges in" (vmspec2, page 146) the "incoming" frame situation;
executes the instructions symbolically
and therefore calculates the "outgoing" frame situation.
|
private void |
extendMessageWithFlow(StructuralCodeConstraintException e)
Extends the StructuralCodeConstraintException ("e") object with an at-the-end-extended message.
|
ExceptionHandler[] |
getExceptionHandlers()
Returns the exception handlers of this instruction.
|
private String |
getExecutionChain()
Returns the control flow execution chain.
|
Frame |
getInFrame() |
InstructionHandle |
getInstruction()
Returns the InstructionHandle this InstructionContext is wrapped around.
|
Frame |
getOutFrame(ArrayList execChain)
Returns a clone of the "outgoing" frame situation with respect to the given ExecutionChain.
|
InstructionContext[] |
getSuccessors()
Returns the usual control flow successors.
|
int |
getTag()
The getTag and setTag methods may be used for
temporary flagging, such as graph colouring.
|
private ControlFlowGraph.InstructionContextImpl |
lastExecutionJSR()
Returns the InstructionContextImpl with an JSR/JSR_W
that was last in the ExecutionChain, without
a corresponding RET, i.e.
|
private boolean |
mergeInFrames(Frame inFrame)
Does the actual merging (vmspec2, page 146).
|
void |
setTag(int tag)
The getTag and setTag methods may be used for
temporary flagging, such as graph colouring.
|
String |
toString()
Returns a simple String representation of this InstructionContext.
|
private int TAG
getTag(),
setTag(int)private InstructionHandle instruction
private Map inFrames
private Map outFrames
private ArrayList executionPredecessors
public ControlFlowGraph.InstructionContextImpl(InstructionHandle inst)
public int getTag()
InstructionContextgetTag in interface InstructionContextInstructionContext.setTag(int tag)public void setTag(int tag)
InstructionContextsetTag in interface InstructionContextInstructionContext.getTag()public ExceptionHandler[] getExceptionHandlers()
getExceptionHandlers in interface InstructionContextpublic Frame getOutFrame(ArrayList execChain)
getOutFrame in interface InstructionContextInstructionContext.execute(Frame, ArrayList, InstConstraintVisitor, ExecutionVisitor)public Frame getInFrame()
getInFrame in interface InstructionContextpublic boolean execute(Frame inFrame, ArrayList execPreds, InstConstraintVisitor icv, ExecutionVisitor ev)
execute in interface InstructionContextControlFlowGraph,
ExecutionVisitor,
InstructionContext.getOutFrame(ArrayList)public String toString()
private boolean mergeInFrames(Frame inFrame)
private String getExecutionChain()
private void extendMessageWithFlow(StructuralCodeConstraintException e)
public InstructionHandle getInstruction()
InstructionContextgetInstruction in interface InstructionContextprivate ControlFlowGraph.InstructionContextImpl lastExecutionJSR()
public InstructionContext[] getSuccessors()
InstructionContextgetSuccessors in interface InstructionContextInstructionContext.getExceptionHandlers()private InstructionHandle[] _getSuccessors()