public abstract class BinaryInst extends TACInst
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
destination
Destination variable
|
protected java.lang.String |
leftSource
Left source operand (type of source allowed varies in different binary
instructions)
|
protected java.lang.String |
rightSource
Right source operand (type of source allowed varies in different binary
instructions)
|
Constructor and Description |
---|
BinaryInst(int opcode,
java.lang.String destination,
java.lang.String leftSource,
java.lang.String rightSource)
BinaryInst constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Compares this object with the parameter object
|
java.lang.String |
getDestination()
Get the destination operand variable
|
java.lang.String |
getLeftSource()
Get the left source operand
|
java.lang.String |
getRightSource()
Get the right source operand
|
java.lang.String |
getString()
Get string representation of instruction (without comments)
(note: in general, you want to use toString() to get instruction string)
|
void |
setDestination(java.lang.String destination)
Set the destination operand variable
|
abstract void |
setLeftSource(java.lang.String leftSource)
Set the left source operand
|
abstract void |
setRightSource(java.lang.String rightSource)
Set the right source operand
|
accept, addComment, checkBoolConst, checkConst, checkIntConst, checkLabel, checkStrConst, checkVar, getBinaryOpcode, getComments, getOp, getOpcode, getUnaryOpcode, isBinary, isCall, isIf, isLoad, isParam, isPhi, isReturn, isStore, isUnary, isValidID, removeComments, toString
protected java.lang.String destination
protected java.lang.String leftSource
protected java.lang.String rightSource
public BinaryInst(int opcode, java.lang.String destination, java.lang.String leftSource, java.lang.String rightSource)
opcode
- opcode of binary instructiondestination
- destination variableleftSource
- source operand (type of source allowed varies in
different binary insn)rightSource
- source operand (type of source allowed varies in
different binary insn)branch
- branch of this phi assignment (for upward recursion)public java.lang.String getDestination()
public void setDestination(java.lang.String destination)
destination
- new destination operandpublic java.lang.String getLeftSource()
public abstract void setLeftSource(java.lang.String leftSource)
leftSource
- new left source operandpublic java.lang.String getRightSource()
public abstract void setRightSource(java.lang.String rightSource)
rightSource
- new right source operandpublic boolean equals(java.lang.Object o)
public java.lang.String getString()