How can the offset for a JVM jump instruction be 32768?
问题 While writing an answer to a question about JVM byte code offsets, I noticed something in the behavior of javac and the resulting class files that I can not explain: When compiling a class like this class FarJump { public static void main(String args[]) { call(0, 1); } public static void call(int x, int y) { if (x < y) { y++; y++; // ... (10921 times - too much code to post here!) y++; y++; } System.out.println(y); } } then the resulting byte code will contain the following if_icmpge