diff --git a/jode/jode/bytecode/BytecodeInfo.java.in b/jode/jode/bytecode/BytecodeInfo.java.in index 5c9fbf3..1148da1 100644 --- a/jode/jode/bytecode/BytecodeInfo.java.in +++ b/jode/jode/bytecode/BytecodeInfo.java.in @@ -64,7 +64,9 @@ public class BytecodeInfo extends BinaryInfo implements Opcodes { int instructionCount = 0; InstructionList() { - borderInstr = new Instruction(opc_xxxunusedxxx); + // opc_impdep1 is used as border instruction, it may not + // occur in bytecode. + borderInstr = new Instruction(opc_impdep1); borderInstr.nextByAddr = borderInstr.prevByAddr = borderInstr; } diff --git a/jode/jode/bytecode/Instruction.java b/jode/jode/bytecode/Instruction.java index 1508962..48fc1e1 100644 --- a/jode/jode/bytecode/Instruction.java +++ b/jode/jode/bytecode/Instruction.java @@ -333,13 +333,13 @@ public final class Instruction implements Opcodes{ } public final Instruction getPrevByAddr() { - if (prevByAddr.opcode == opc_xxxunusedxxx) + if (prevByAddr.opcode == opc_impdep1) return null; return prevByAddr; } public final Instruction getNextByAddr() { - if (nextByAddr.opcode == opc_xxxunusedxxx) + if (nextByAddr.opcode == opc_impdep1) return null; return nextByAddr; } @@ -608,7 +608,7 @@ public final class Instruction implements Opcodes{ if (lnt != null) { for (int i=0; i< lnt.length; i++) { if (lnt[i].start == this) { - if (nextByAddr.opcode == opc_xxxunusedxxx + if (nextByAddr.opcode == opc_impdep1 || (i+1 < lnt.length && lnt[i+1].start == nextByAddr)) { /* Remove the line number. diff --git a/jode/jode/bytecode/Opcodes.java b/jode/jode/bytecode/Opcodes.java index e6edc8b..0234647 100644 --- a/jode/jode/bytecode/Opcodes.java +++ b/jode/jode/bytecode/Opcodes.java @@ -226,6 +226,8 @@ public interface Opcodes { public final static int opc_goto_w = 200; public final static int opc_jsr_w = 201; public final static int opc_breakpoint = 202; + public final static int opc_impdep1 = 254; + public final static int opc_impdep2 = 255; public final static String[] opcodeString = { "nop", "aconst_null", "iconst_m1", "iconst_0", "iconst_1",