IfICmpEqInst.execute Integer equal issue
raoshaoquan opened this issue · comments
`public class IfICmpEqInst implements Instruction {
public final int offset;
public IfICmpEqInst(int offset) {
this.offset = offset;
}
@OverRide
public int offset() {
return 3;
}
@OverRide
public void execute(Frame frame) {
Integer val2= frame.popInt();
Integer val1= frame.popInt();
### if (val1 == val2) { //Objects.equals(val1, val2)
frame.nextPc = frame.thread.getPc() + offset;
}
}
}
`
yes, you are right at if valx type is reference , but in this case, the valx always int. not a Integer ref .
I see
sorry , you are right, i meet a corner case . 😂