public class BinopInstruction extends ExpressionPushingInstruction<PsiExpression> implements BranchingInstruction
Modifier and Type | Field and Description |
---|---|
static IElementType |
STRING_EQUALITY_BY_CONTENT
A special operation to express string comparison by content (like equals() method does).
|
Constructor and Description |
---|
BinopInstruction(IElementType opSign,
PsiExpression expression,
PsiType resultType) |
BinopInstruction(IElementType opSign,
PsiExpression expression,
PsiType resultType,
int lastOperand) |
BinopInstruction(IElementType opSign,
PsiExpression expression,
PsiType resultType,
int lastOperand,
boolean unrolledLoop) |
Modifier and Type | Method and Description |
---|---|
DfaInstructionState[] |
accept(DataFlowRunner runner,
DfaMemoryState stateBefore,
InstructionVisitor visitor) |
TextRange |
getExpressionRange() |
IElementType |
getOperationSign() |
PsiType |
getResultType() |
boolean |
isWidened() |
java.lang.String |
toString() |
void |
widenOperationInLoop()
Make operation wide (less precise) if necessary (called for the operations inside loops only)
|
getExpression
getIndex, nextInstruction, setIndex
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getIndex
public static final IElementType STRING_EQUALITY_BY_CONTENT
public BinopInstruction(IElementType opSign, PsiExpression expression, PsiType resultType)
public BinopInstruction(IElementType opSign, PsiExpression expression, PsiType resultType, int lastOperand)
public BinopInstruction(IElementType opSign, PsiExpression expression, PsiType resultType, int lastOperand, boolean unrolledLoop)
opSign
- sign of the operationexpression
- PSI element to bind the instruction toresultType
- result of the operationlastOperand
- number of last operand if anchor is a PsiPolyadicExpression
and this instruction is the result of
part of that expression; -1 if not applicableunrolledLoop
- true means that this instruction is executed inside an unrolled loop; in this case it will never be widenedpublic void widenOperationInLoop()
public TextRange getExpressionRange()
getExpressionRange
in class ExpressionPushingInstruction<PsiExpression>
public DfaInstructionState[] accept(DataFlowRunner runner, DfaMemoryState stateBefore, InstructionVisitor visitor)
accept
in class Instruction
public PsiType getResultType()
public java.lang.String toString()
toString
in class java.lang.Object
public IElementType getOperationSign()
public boolean isWidened()