|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BinaryOperation
x = y binop z, representing all binary operations.
Example:
a = f + g;
To find out which type of binary operation this is, you have to
call getOperator() and compare it with the BinaryOperator
enumerated type.
InfixExpression
Method Summary | |
---|---|
ASTNode |
getNode()
Returns the node this instruction is for. |
Variable |
getOperand1()
Returns the first operand. |
Variable |
getOperand2()
Returns the second operand. |
BinaryOperator |
getOperator()
Returns the binary operator. |
Methods inherited from interface edu.cmu.cs.crystal.tac.model.AssignmentInstruction |
---|
getTarget |
Methods inherited from interface edu.cmu.cs.crystal.tac.model.TACInstruction |
---|
transfer, transfer |
Method Detail |
---|
ASTNode getNode()
Expression
. Usually,
one instruction exists per AST node, but can be more
when AST nodes are desugared, such as for post-increment.
getNode
in interface TACInstruction
TACInstruction.getNode()
Variable getOperand1()
BinaryOperator getOperator()
Variable getOperand2()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |