trait IFICMPInstruction[T <: IFICMPInstruction[T]] extends SimpleConditionalBranchInstruction[T] with IFICMPInstructionLike
- Alphabetic
- By Inheritance
- IFICMPInstruction
- IFICMPInstructionLike
- SimpleConditionalBranchInstruction
- SimpleConditionalBranchInstructionLike
- SimpleBranchInstruction
- ConstantLengthInstruction
- SimpleBranchInstructionLike
- ConstantLengthInstructionLike
- ConditionalBranchInstruction
- ConditionalBranchInstructionLike
- ControlTransferInstruction
- ControlTransferInstructionLike
- Instruction
- InstructionLike
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def branchoffset: Int
- Definition Classes
- SimpleBranchInstruction
- abstract def condition: RelationalOperator
- Definition Classes
- IFICMPInstructionLike
- abstract def copy(branchoffset: Int): SimpleConditionalBranchInstruction[T]
- Definition Classes
- SimpleConditionalBranchInstruction
- abstract def mnemonic: String
The mnemonic of the instruction as defined by the JVM specification.
The mnemonic of the instruction as defined by the JVM specification.
- Definition Classes
- InstructionLike
- abstract def negate(newBranchoffset: Int = branchoffset): SimpleConditionalBranchInstruction[_]
Returns the IF instruction that - when compared with this if instruction - performs a jump in case of a fall-through and vice-versa.
Returns the IF instruction that - when compared with this if instruction - performs a jump in case of a fall-through and vice-versa. I.e., given the following condition:
(a < b)
, the negation is performend:!(a < b)
which is equivalent to(a ≥ b)
. In other words, if this IF instruction is an IFGT instruction and IFLE instruction is returned.- Definition Classes
- SimpleConditionalBranchInstruction
- abstract def opcode: Int
The opcode of the instruction as defined by the JVM specification.
The opcode of the instruction as defined by the JVM specification. The opcode is a value in the range [0..255].
- Definition Classes
- InstructionLike
- abstract def operator: String
The comparison operator (incl.
The comparison operator (incl. the constant) underlying the if instruction. E.g.,
<
,< 0
or!= null
.- Definition Classes
- SimpleConditionalBranchInstructionLike
- abstract def toLabeledInstruction(currentPC: Int): LabeledInstruction
Converts this instruction to a LabeledInstruction, where relative jump targets are replaced by symbols using the program counters of the target instructions as Symbols (i.e., absolute targets).
Converts this instruction to a LabeledInstruction, where relative jump targets are replaced by symbols using the program counters of the target instructions as Symbols (i.e., absolute targets).
- currentPC
The pc of the current instruction.
- Definition Classes
- Instruction
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def asATHROW: ATHROW.type
- Definition Classes
- Instruction
- def asArithmeticInstruction: ArithmeticInstruction
- Definition Classes
- Instruction
- def asCompoundConditionalBranchInstruction: CompoundConditionalBranchInstruction
- Definition Classes
- Instruction
- final def asControlTransferInstruction: ControlTransferInstruction
- Definition Classes
- ControlTransferInstruction → Instruction
- def asCreateNewArrayInstruction: CreateNewArrayInstruction
- Definition Classes
- Instruction
- def asGotoInstruction: GotoInstruction
- Definition Classes
- Instruction
- def asIF0Instruction: IF0Instruction[_]
- Definition Classes
- Instruction
- def asIFACMPInstruction: IFACMPInstruction[_]
- Definition Classes
- Instruction
- final def asIFICMPInstruction: IFICMPInstruction.this.type
- Definition Classes
- IFICMPInstruction → Instruction
- def asIFXNullInstruction: IFXNullInstruction[_]
- Definition Classes
- Instruction
- def asIINC: IINC
- Definition Classes
- Instruction
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asInvocationInstruction: InvocationInstruction
- Definition Classes
- Instruction
- def asLOOKUPSWITCH: LOOKUPSWITCH
- Definition Classes
- Instruction
- def asLoadLocalVariableInstruction: LoadLocalVariableInstruction
- Definition Classes
- Instruction
- def asMethodInvocationInstruction: MethodInvocationInstruction
- Definition Classes
- Instruction
- def asNEW: NEW
- Definition Classes
- Instruction
- def asReturnInstruction: ReturnInstruction
- Definition Classes
- Instruction
- final def asSimpleBranchInstruction: SimpleBranchInstruction
- Definition Classes
- SimpleBranchInstruction → Instruction
- final def asSimpleConditionalBranchInstruction: IFICMPInstruction.this.type
- Definition Classes
- SimpleConditionalBranchInstruction → Instruction
- def asStoreLocalVariableInstruction: StoreLocalVariableInstruction
- Definition Classes
- Instruction
- def asTABLESWITCH: TABLESWITCH
- Definition Classes
- Instruction
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def expressionResult: NoExpression.type
Returns the location – Stack, Register or NoExpression – where the value computed by this instruction is stored.
Returns the location – Stack, Register or NoExpression – where the value computed by this instruction is stored. In this case an instruction is only considered to be an expression if it puts a value on the stack or in a register that is the result of some kind of computation; i.e., just copying, duplicating or moving a value between the stack and the registers is not considered to be an expression.
- Definition Classes
- ControlTransferInstructionLike → InstructionLike
- Note
The CHECKCAST instruction is special in the sense that it just inspects the top-most value.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def indexOfNextInstruction(currentPC: PC)(implicit code: Code): Int
The index of the next instruction in the (sparse) code array.
The index of the next instruction in the (sparse) code array.
- Definition Classes
- ConstantLengthInstruction → Instruction
- Note
This is primarily a convenience method that delegates to the method
indexOfNextInstrution(PC,Boolean)
. However, given that this is also the standard method called by clients, it is often meaningful to directly implement this. In particular since most instructions cannot be modified by wide.
- final def indexOfNextInstruction(currentPC: PC, modifiedByWide: Boolean): Int
The index of the next instruction in the code array.
The index of the next instruction in the code array.
- Definition Classes
- ConstantLengthInstructionLike → InstructionLike
- final def indexOfReadLocal: Int
The index of the local (variable)/register that is read is returned.
The index of the local (variable)/register that is read is returned. This method is only defined if readsLocal returns
true
.- Definition Classes
- ConditionalBranchInstructionLike → InstructionLike
- final def indexOfWrittenLocal: Int
The index of the local (variable)/register that is written.
The index of the local (variable)/register that is written. This method is only defined if writesLocal returns
true
.- Definition Classes
- ConditionalBranchInstructionLike → InstructionLike
- def isAthrow: Boolean
- Definition Classes
- InstructionLike
- def isCheckcast: Boolean
- Definition Classes
- Instruction
- def isCompoundConditionalBranchInstruction: Boolean
- Definition Classes
- Instruction
- final def isControlTransferInstruction: Boolean
- Definition Classes
- ControlTransferInstructionLike → InstructionLike
- def isGotoInstruction: Boolean
- Definition Classes
- Instruction
- def isIINC: Boolean
- Definition Classes
- Instruction
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isInvocationInstruction: Boolean
- Definition Classes
- Instruction
- def isInvokeStatic: Boolean
- Definition Classes
- Instruction
- final def isIsomorphic(thisPC: PC, otherPC: PC)(implicit code: Code): Boolean
Determines if this instruction is isomorphic to the given instruction.
Determines if this instruction is isomorphic to the given instruction.
Two instructions are isomporphic if they access the same operand and register values and if the instructions have the same bytecode representation, except of (A) (potential) padding bytes and (B) the branch offset of JSR(_W) instructions. In the first case the branch offsets are corrected by the number of padding bytes and in the second case the absolute addresses are compared (i.e., whether both instructions call the same subroutine).
For example, an
aload_0
instruction is only isomorphic to anotheraload_0
instruction and is not isomorphic to anaload(0)
instruction – though the runtime effect is the same. However, a LOOKUPSWITCH (TABLESWITCH) instruction is considered isomorphic to another respective instruction if the only difference is the number of padding bytes. Furthermore, two JSR(_W) instructions are isomorphic if and only if they jump to the same subroutine.- Definition Classes
- SimpleConditionalBranchInstructionLike → InstructionLike
- Note
The number of padding bytes is generally calculated by
(otherPC % 4) - (thisPC %4)
(==="padding other" - "padding this"
) and should be added to the branch offsets of this(XYZ)switch
instruction when the branch targets are compared to the other instructions branchoffsets.// "padding b" - "padding a" // === (3 - (bPC % 4)) - (3 - (aPC % 4)) // === (aPC % 4) - (bPC %4)
,this.isIsomorphic(
thisPC
,thisPC
) is alwaystrue
- def isLoadConstantInstruction: Boolean
- Definition Classes
- InstructionLike
- def isLoadLocalVariableInstruction: Boolean
- Definition Classes
- Instruction
- def isMethodInvocationInstruction: Boolean
- Definition Classes
- Instruction
- def isMonitorInstruction: Boolean
- Definition Classes
- InstructionLike
- def isRET: Boolean
- Definition Classes
- InstructionLike
- def isReturnInstruction: Boolean
- Definition Classes
- InstructionLike
- final def isSimpleBranchInstruction: Boolean
- Definition Classes
- SimpleBranchInstruction → Instruction
- final def isSimpleConditionalBranchInstruction: Boolean
- Definition Classes
- SimpleConditionalBranchInstruction → Instruction
- def isStackManagementInstruction: Boolean
- Definition Classes
- Instruction
- def isStoreLocalVariableInstruction: Boolean
- Definition Classes
- Instruction
- final def jumpTargets(currentPC: PC)(implicit code: Code, classHierarchy: ClassHierarchy = ClassHierarchy.PreInitializedClassHierarchy): Iterator[PC]
Iterator over all (absolute) pcs to which this instruction will jump to.
Iterator over all (absolute) pcs to which this instruction will jump to.
- returns
All instructions to which this instruction explicitly jumps to. (The instruction to which an if-instruction i potentially falls through, is not a jump target w.r.t. i; it may still be a jump target w.r.t. some other control transfer instruction.)
- Definition Classes
- SimpleBranchInstruction → ControlTransferInstruction
- Note
Computing the jump targets is particularly expensive in case of RET instructions, and should be avoided if only "all jump targets" of a method's body should be identified. In that case, collecting the PCs following the JSRs is sufficient.
- final def jvmExceptions: List[ObjectType]
The exceptions that may be thrown by the JVM at runtime if the execution of this instruction fails.
The exceptions that may be thrown by the JVM at runtime if the execution of this instruction fails. I.e., these are neither exceptions that are explicitly created and then thrown by user code nor errors that may arise due to an invalid code base (in particular
LinkageError
s). However,OutOfMemoryError
s are possible.- Definition Classes
- ControlTransferInstructionLike → InstructionLike
- Note
The returned types always precisely describe the thrown exception; they are not upper bounds. All instructions – except of the InvocationInstructions and the ATHROW$ instruction – will always either succeed, throw a linkage time related exception or throw one of the specified exceptions.
- final def length: Int
The number of bytes (in the Code array) used by the instruction.
The number of bytes (in the Code array) used by the instruction.
- Definition Classes
- SimpleConditionalBranchInstructionLike → ConstantLengthInstructionLike
- final def mayThrowExceptions: Boolean
Returns
true
if the evaluation of the instruction may lead to some runtime exception.Returns
true
if the evaluation of the instruction may lead to some runtime exception. For example, in case of INVOKESTATICjvmExceptions
will return an empty list. However, in general the called method may throw an arbitrary exception.Errors (such as LinkageError) related to invalid projects are not considered.
- Definition Classes
- ControlTransferInstructionLike → InstructionLike
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def nextInstructions(currentPC: PC, regularSuccessorsOnly: Boolean)(implicit code: Code, classHierarchy: ClassHierarchy = ClassHierarchy.PreInitializedClassHierarchy): List[PC]
Returns the pcs of the instructions that may be executed next at runtime.
Returns the pcs of the instructions that may be executed next at runtime. This method takes potentially thrown exceptions into account. I.e., every instruction that may throw an exception checks if it is handled locally and – if so – checks if an appropriate handler exists and – if so – also returns the first instruction of the handler. The chain may contain duplicates, iff the state is potentially different when the target instruction is reached.
A simple conditional branch instruction has two targets unless both targets point to the same instruction. In that case the jump has only one target, because the state - independent of the taken path - always has to be the same.
- regularSuccessorsOnly
If
true
, only those instructions are returned which are not related to an exception thrown by this instruction.- returns
The absolute addresses of all instructions that may be executed next at runtime.
- Definition Classes
- SimpleConditionalBranchInstruction → Instruction
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def numberOfPoppedOperands(ctg: (Int) => ComputationalTypeCategory): Int
The number of values that are popped from the operand stack.
The number of values that are popped from the operand stack. Here, long and double values are also counted as one value though they use two stack slots. E.g., IADD (integer add) and LADD (long add) both pop two values and push one value.
- ctg
A function that returns the computational type category of the value on the operand stack with a given value index. E.g., The top value on the operand stack has index '0' and may occupy one (for category 1 values) or two stack slots (for category 2 values.)
- Definition Classes
- ConditionalBranchInstructionLike → InstructionLike
- Note
In case of some of the StackManagementInstruction the number of popped values is not fixed. In that case the number depends on the concrete layout of the operand stack. E.g., the POP2 instruction may just pop one categeory 2 value (of type
long
ordouble
) or two category 1 values.
- final def numberOfPushedOperands(ctg: (Int) => ComputationalTypeCategory): Int
The number of values that are put onto the operand stack.
The number of values that are put onto the operand stack. Here, long and double values are also counted as one value though they use two stack slots. E.g., IADD (integer add) and LADD (long add) both pop two values and push one value.
- ctg
A function that returns the computational type category of the value on the operand stack with a given value index. The top value on the operand stack has index '0' and may occupy one (for category 1 values) or two stack slots (for category 2 values.)
- Definition Classes
- ConditionalBranchInstructionLike → InstructionLike
- Note
In case of some of the StackManagementInstruction this number is not fixed. In that case the number depends on the concrete layout of the operand stack. E.g., the DUP2 instruction may just duplicate one categeory 2 value (result is 1) (of type long or double) or two category 1 values (result is 2).
- final def operandCount: Int
The number of operand values popped from the operand stack.
The number of operand values popped from the operand stack.
- Definition Classes
- IFICMPInstructionLike → ConditionalBranchInstructionLike
- final def readsLocal: Boolean
Returns
true
if this instruction reads/uses a local variable.Returns
true
if this instruction reads/uses a local variable.- Definition Classes
- ConditionalBranchInstructionLike → InstructionLike
- def similar(other: Instruction): Boolean
Checks for structural equality of two instructions.
Checks for structural equality of two instructions.
- Definition Classes
- Instruction
- Note
Implemted by using the underlying (compiler generated) equals methods.
- final def stackSlotsChange: Int
The number of stack slots pushed or popped by this instruction.
The number of stack slots pushed or popped by this instruction.
- Definition Classes
- IFICMPInstructionLike → InstructionLike
- Note
Overall, each DUP instruction always pushes the same number of stack slots. Only the number of values that are processed may depend on the stack layout.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(currentPC: Int): String
Returns a string representation of this instruction.
Returns a string representation of this instruction. If this instruction is a (conditional) jump instruction, then the PCs of the target instructions are given absolute address.
- currentPC
The program counter of this instruction. Used to resolve relative jump targets.
- Definition Classes
- SimpleConditionalBranchInstruction → InstructionLike
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def writesLocal: Boolean
Returns
true
if this instruction writes/updates a local variable.Returns
true
if this instruction writes/updates a local variable.- Definition Classes
- ConditionalBranchInstructionLike → InstructionLike
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated