edu.cmu.cs.crystal.tac.eclipse
Class EclipseInstructionSequence
java.lang.Object
edu.cmu.cs.crystal.tac.eclipse.EclipseInstructionSequence
- All Implemented Interfaces:
- TACInstruction
public class EclipseInstructionSequence
- extends Object
- Author:
- Kevin Bierhoff
Method Summary |
|
deriveResult(ITACBranchSensitiveTransferFunction<LE> tf,
List<ILabel> labels,
TACInstruction targetInstr,
LE value,
boolean afterResult)
|
|
deriveResult(ITACTransferFunction<LE> tf,
TACInstruction targetInstr,
LE value,
boolean afterResult)
|
E |
getNode()
Returns the node this instruction is for. |
String |
toString()
|
|
transfer(ITACBranchSensitiveTransferFunction<LE> tf,
List<ILabel> labels,
LE value)
Use this method to transfer over an instruction. |
|
transfer(ITACTransferFunction<LE> tf,
LE value)
Use this method to transfer over an instruction. |
EclipseInstructionSequence
public EclipseInstructionSequence(ASTNode node,
TACInstruction[] instructions,
int useAsResult,
IEclipseVariableQuery tac)
EclipseInstructionSequence
public EclipseInstructionSequence(ASTNode node,
TACInstruction[] instructions,
IEclipseVariableQuery tac)
transfer
public <LE> LE transfer(ITACTransferFunction<LE> tf,
LE value)
- Use this method to transfer over an instruction. This method performs double-dispatch
to call the appropriate
transfer
method on the transfer function being
passed.
- Specified by:
transfer
in interface TACInstruction
- Type Parameters:
LE
- Lattice element used in the transfer function.- Parameters:
tf
- Transfer function.value
- Incoming lattice value.
- Returns:
- Outgoing lattice value after transfering over this instruction.
transfer
public <LE> IResult<LE> transfer(ITACBranchSensitiveTransferFunction<LE> tf,
List<ILabel> labels,
LE value)
- Use this method to transfer over an instruction. This method performs double-dispatch
to call the appropriate
transfer
method on the transfer function being
passed.
- Specified by:
transfer
in interface TACInstruction
- Type Parameters:
LE
- Lattice element used in the transfer function.- Parameters:
tf
- Transfer function.labels
- Branch labels to consider.value
- Incoming lattice value.
- Returns:
- Outgoing lattice values for given labels after transfering over this instruction.
deriveResult
public <LE> LE deriveResult(ITACTransferFunction<LE> tf,
TACInstruction targetInstr,
LE value,
boolean afterResult)
deriveResult
public <LE> IResult<LE> deriveResult(ITACBranchSensitiveTransferFunction<LE> tf,
List<ILabel> labels,
TACInstruction targetInstr,
LE value,
boolean afterResult)
toString
public String toString()
- Overrides:
toString
in class Object
getNode
public E getNode()
- Description copied from interface:
TACInstruction
- Returns the node this instruction is for. Usually,
one instruction exists per AST node, but can be more
when AST nodes are desugared, such as for post-increment.
Subtypes may give more specific information on the type of
AST node returned, but more specific typing is not guaranteed
due to possible evolution of the Eclipse AST or these interfaces.
- Specified by:
getNode
in interface TACInstruction
- Returns:
- The AST node this instruction is for.