- if ((flags & (NATIVE|ABSTRACT))==0) {
- sb.append("{\n");
- for(int i=0;i<size();i++) {
- sb.append(" ");
- for(int j=i==0?1:i;j<10000;j*=10) sb.append(" ");
- sb.append(i).append(": ");
- sb.append(OP_NAMES[op[i]&0xff]);
- String s = null;
- if (arg[i] instanceof Type) s = ((Type)arg[i]).debugToString();
- else if (arg[i] instanceof Type.Class.Member) s = ((Type.Class.Member)arg[i]).toString();
- else if (arg[i] instanceof String) s = "\"" + s + "\"";
- else if (arg[i] != null) s = arg[i].toString();
- if (s != null) sb.append(" ").append(s);
- sb.append("\n");
- }
- sb.append(" }\n");
- } else {
- sb.append(";");
+ }
+
+ // Unused //////////////////////////////////////////////////////////////////////////////
+
+ /** Negates the IF* instruction, <i>op</i> (IF_ICMPGT -> IF_ICMPLE, IFNE -> IFEQ, etc)
+ @exception IllegalArgumentException if <i>op</i> isn't an IF* instruction */
+ public static byte negate(byte op) {
+ switch(op) {
+ case IFEQ: return IFNE;
+ case IFNE: return IFEQ;
+ case IFLT: return IFGE;
+ case IFGE: return IFLT;
+ case IFGT: return IFLE;
+ case IFLE: return IFGT;
+ case IF_ICMPEQ: return IF_ICMPNE;
+ case IF_ICMPNE: return IF_ICMPEQ;
+ case IF_ICMPLT: return IF_ICMPGE;
+ case IF_ICMPGE: return IF_ICMPLT;
+ case IF_ICMPGT: return IF_ICMPLE;
+ case IF_ICMPLE: return IF_ICMPGT;
+ case IF_ACMPEQ: return IF_ACMPNE;
+ case IF_ACMPNE: return IF_ACMPEQ;
+
+ default:
+ throw new IllegalArgumentException("Can't negate " + Integer.toHexString(op));