7.5.35 if_acmp<cond>

Branch if reference comparison succeeds.

Format

if_acmp

branch

Forms

if_acmpeq = 104 (0x68) if_acmpne = 105 (0x69)

Stack

…, value1, value2 → …

Description

Both value1 and value2 must be of type reference. They are both popped from the operand stack and compared. The results of the comparisons are as follows:

If the comparison succeeds, branch is used as signed 8-bit offset, and execution proceeds at that offset from the address of the opcode of this if_acmp instruction. The target address must be that of an opcode of an instruction within the method that contains this if_acmp instruction.

Otherwise, execution proceeds at the address of the instruction following this if_acmp instruction.