private class ControlFlowGraph.InstructionContextImpl extends java.lang.Object implements InstructionContext
Modifier and Type | Field and Description |
---|---|
private java.util.ArrayList |
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 |
inFrames
The 'incoming' execution Frames.
|
private InstructionHandle |
instruction
The InstructionHandle this InstructionContext is wrapped around.
|
private java.util.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 |
---|
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 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 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 InstructionHandle instruction
private java.util.Map inFrames
private java.util.Map outFrames
private java.util.ArrayList executionPredecessors
public InstructionContextImpl(InstructionHandle inst)
public int getTag()
InstructionContext
getTag
in interface InstructionContext
InstructionContext.setTag(int tag)
public void setTag(int tag)
InstructionContext
setTag
in interface InstructionContext
InstructionContext.getTag()
public ExceptionHandler[] getExceptionHandlers()
getExceptionHandlers
in interface InstructionContext
public Frame getOutFrame(java.util.ArrayList execChain)
getOutFrame
in interface InstructionContext
InstructionContext.execute(Frame, ArrayList, InstConstraintVisitor, ExecutionVisitor)
public Frame getInFrame()
getInFrame
in interface InstructionContext
public boolean execute(Frame inFrame, java.util.ArrayList execPreds, InstConstraintVisitor icv, ExecutionVisitor ev)
execute
in interface InstructionContext
ControlFlowGraph
,
ExecutionVisitor
,
InstructionContext.getOutFrame(ArrayList)
public java.lang.String toString()
toString
in class java.lang.Object
private boolean mergeInFrames(Frame inFrame)
private java.lang.String getExecutionChain()
private void extendMessageWithFlow(StructuralCodeConstraintException e)
public InstructionHandle getInstruction()
InstructionContext
getInstruction
in interface InstructionContext
private ControlFlowGraph.InstructionContextImpl lastExecutionJSR()
public InstructionContext[] getSuccessors()
InstructionContext
getSuccessors
in interface InstructionContext
InstructionContext.getExceptionHandlers()
private InstructionHandle[] _getSuccessors()