edu.cmu.cs.crystal.tac
Interface CastInstruction

All Superinterfaces:
AssignmentInstruction, OneOperandInstruction, TACInstruction

public interface CastInstruction
extends OneOperandInstruction

x = (T) y.

Author:
Kevin Bierhoff
See Also:
CastExpression

Method Summary
 Type getCastToTypeNode()
          Returns the type the operand is being casted to.
 ASTNode getNode()
          Returns the node this instruction is for.
 
Methods inherited from interface edu.cmu.cs.crystal.tac.OneOperandInstruction
getOperand
 
Methods inherited from interface edu.cmu.cs.crystal.tac.AssignmentInstruction
getTarget
 
Methods inherited from interface edu.cmu.cs.crystal.tac.TACInstruction
transfer, transfer
 

Method Detail

getNode

ASTNode getNode()
Returns the node this instruction is for. Should be of type CastExpression. Usually, one instruction exists per AST node, but can be more when AST nodes are desugared, such as for post-increment.

Specified by:
getNode in interface TACInstruction
Returns:
the node this instruction is for.
See Also:
TACInstruction.getNode()

getCastToTypeNode

Type getCastToTypeNode()
Returns the type the operand is being casted to.

Returns:
the type the operand is being casted to.