private class ControlFlowGraph.InstructionContextImpl extends java.lang.Object implements InstructionContext
| Modifier and Type | Field and Description |
|---|---|
private java.util.List<InstructionContext> |
executionPredecessors
The 'execution predecessors' - a list of type InstructionContext
of those instances that have been execute()d before in that order.
|
private java.util.Map<InstructionContext,Frame> |
inFrames
The 'incoming' execution Frames.
|
private InstructionHandle |
instruction
The InstructionHandle this InstructionContext is wrapped around.
|
private java.util.Map<InstructionContext,Frame> |
outFrames
The 'outgoing' execution Frames.
|
private int |
TAG
The TAG field is here for external temporary flagging, such
as graph colouring.
|
| Constructor and Description |
|---|
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,
java.util.ArrayList<InstructionContext> 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 java.lang.String |
getExecutionChain()
Returns the control flow execution chain.
|
Frame |
getInFrame() |
InstructionHandle |
getInstruction()
Returns the InstructionHandle this InstructionContext is wrapped around.
|
Frame |
getOutFrame(java.util.ArrayList<InstructionContext> 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.
|
java.lang.String |
toString()
Returns a simple String representation of this InstructionContext.
|
private int TAG
getTag(),
setTag(int)private final InstructionHandle instruction
private final java.util.Map<InstructionContext,Frame> inFrames
private final java.util.Map<InstructionContext,Frame> outFrames
private java.util.List<InstructionContext> executionPredecessors
public 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(java.util.ArrayList<InstructionContext> execChain)
getOutFrame in interface InstructionContextInstructionContext.execute(Frame, ArrayList, InstConstraintVisitor, ExecutionVisitor)public Frame getInFrame()
getInFrame in interface InstructionContextpublic boolean execute(Frame inFrame, java.util.ArrayList<InstructionContext> execPreds, InstConstraintVisitor icv, ExecutionVisitor ev)
execute in interface InstructionContextControlFlowGraph,
ExecutionVisitor,
InstructionContext.getOutFrame(ArrayList)public java.lang.String toString()
toString in class java.lang.Objectprivate boolean mergeInFrames(Frame inFrame)
private java.lang.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()