use implementation specific opcode as border opcode instead of xxxunknownxxx

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@1146 379699f6-c40d-0410-875b-85095c16579e
branch_1_1
jochen 26 years ago
parent 2108dbbaa2
commit ae9c23f5ec
  1. 4
      jode/jode/bytecode/BytecodeInfo.java.in
  2. 6
      jode/jode/bytecode/Instruction.java
  3. 2
      jode/jode/bytecode/Opcodes.java

@ -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;
}

@ -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.

@ -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",

Loading…
Cancel
Save