📄 classfilewriter.java
字号:
case ByteCode.IMUL: case ByteCode.INVOKEINTERFACE: // case ByteCode.INVOKESPECIAL: // but needs to account for case ByteCode.INVOKEVIRTUAL: // pops 'this' (unless static) case ByteCode.IOR: case ByteCode.IREM: case ByteCode.IRETURN: case ByteCode.ISHL: case ByteCode.ISHR: case ByteCode.ISTORE: case ByteCode.ISTORE_0: case ByteCode.ISTORE_1: case ByteCode.ISTORE_2: case ByteCode.ISTORE_3: case ByteCode.ISUB: case ByteCode.IUSHR: case ByteCode.IXOR: case ByteCode.L2F: case ByteCode.L2I: case ByteCode.LOOKUPSWITCH: case ByteCode.LSHL: case ByteCode.LSHR: case ByteCode.LUSHR: case ByteCode.MONITORENTER: case ByteCode.MONITOREXIT: case ByteCode.POP: case ByteCode.PUTFIELD: case ByteCode.SALOAD: case ByteCode.TABLESWITCH: return -1; case ByteCode.ANEWARRAY: case ByteCode.ARRAYLENGTH: case ByteCode.BREAKPOINT: case ByteCode.CHECKCAST: case ByteCode.D2L: case ByteCode.DALOAD: case ByteCode.DNEG: case ByteCode.F2I: case ByteCode.FNEG: case ByteCode.GETSTATIC: case ByteCode.GOTO: case ByteCode.GOTO_W: case ByteCode.I2B: case ByteCode.I2C: case ByteCode.I2F: case ByteCode.I2S: case ByteCode.IINC: case ByteCode.IMPDEP1: case ByteCode.IMPDEP2: case ByteCode.INEG: case ByteCode.INSTANCEOF: case ByteCode.INVOKESTATIC: case ByteCode.L2D: case ByteCode.LALOAD: case ByteCode.LNEG: case ByteCode.NEWARRAY: case ByteCode.NOP: case ByteCode.PUTSTATIC: case ByteCode.RET: case ByteCode.RETURN: case ByteCode.SWAP: case ByteCode.WIDE: return 0; case ByteCode.ACONST_NULL: case ByteCode.ALOAD: case ByteCode.ALOAD_0: case ByteCode.ALOAD_1: case ByteCode.ALOAD_2: case ByteCode.ALOAD_3: case ByteCode.BIPUSH: case ByteCode.DUP: case ByteCode.DUP_X1: case ByteCode.DUP_X2: case ByteCode.F2D: case ByteCode.F2L: case ByteCode.FCONST_0: case ByteCode.FCONST_1: case ByteCode.FCONST_2: case ByteCode.FLOAD: case ByteCode.FLOAD_0: case ByteCode.FLOAD_1: case ByteCode.FLOAD_2: case ByteCode.FLOAD_3: case ByteCode.I2D: case ByteCode.I2L: case ByteCode.ICONST_0: case ByteCode.ICONST_1: case ByteCode.ICONST_2: case ByteCode.ICONST_3: case ByteCode.ICONST_4: case ByteCode.ICONST_5: case ByteCode.ICONST_M1: case ByteCode.ILOAD: case ByteCode.ILOAD_0: case ByteCode.ILOAD_1: case ByteCode.ILOAD_2: case ByteCode.ILOAD_3: case ByteCode.JSR: case ByteCode.JSR_W: case ByteCode.LDC: case ByteCode.LDC_W: case ByteCode.MULTIANEWARRAY: case ByteCode.NEW: case ByteCode.SIPUSH: return 1; case ByteCode.DCONST_0: case ByteCode.DCONST_1: case ByteCode.DLOAD: case ByteCode.DLOAD_0: case ByteCode.DLOAD_1: case ByteCode.DLOAD_2: case ByteCode.DLOAD_3: case ByteCode.DUP2: case ByteCode.DUP2_X1: case ByteCode.DUP2_X2: case ByteCode.LCONST_0: case ByteCode.LCONST_1: case ByteCode.LDC2_W: case ByteCode.LLOAD: case ByteCode.LLOAD_0: case ByteCode.LLOAD_1: case ByteCode.LLOAD_2: case ByteCode.LLOAD_3: return 2; } throw new IllegalArgumentException("Bad opcode: " + opcode); } /* * Number of bytes of operands generated after the opcode. Not in use * currently. */ /* * int extra(int opcode) { switch (opcode) { case ByteCode.AALOAD: case * ByteCode.AASTORE: case ByteCode.ACONST_NULL: case ByteCode.ALOAD_0: case * ByteCode.ALOAD_1: case ByteCode.ALOAD_2: case ByteCode.ALOAD_3: case * ByteCode.ARETURN: case ByteCode.ARRAYLENGTH: case ByteCode.ASTORE_0: case * ByteCode.ASTORE_1: case ByteCode.ASTORE_2: case ByteCode.ASTORE_3: case * ByteCode.ATHROW: case ByteCode.BALOAD: case ByteCode.BASTORE: case * ByteCode.BREAKPOINT: case ByteCode.CALOAD: case ByteCode.CASTORE: case * ByteCode.D2F: case ByteCode.D2I: case ByteCode.D2L: case ByteCode.DADD: * case ByteCode.DALOAD: case ByteCode.DASTORE: case ByteCode.DCMPG: case * ByteCode.DCMPL: case ByteCode.DCONST_0: case ByteCode.DCONST_1: case * ByteCode.DDIV: case ByteCode.DLOAD_0: case ByteCode.DLOAD_1: case * ByteCode.DLOAD_2: case ByteCode.DLOAD_3: case ByteCode.DMUL: case * ByteCode.DNEG: case ByteCode.DREM: case ByteCode.DRETURN: case * ByteCode.DSTORE_0: case ByteCode.DSTORE_1: case ByteCode.DSTORE_2: case * ByteCode.DSTORE_3: case ByteCode.DSUB: case ByteCode.DUP2: case * ByteCode.DUP2_X1: case ByteCode.DUP2_X2: case ByteCode.DUP: case * ByteCode.DUP_X1: case ByteCode.DUP_X2: case ByteCode.F2D: case * ByteCode.F2I: case ByteCode.F2L: case ByteCode.FADD: case * ByteCode.FALOAD: case ByteCode.FASTORE: case ByteCode.FCMPG: case * ByteCode.FCMPL: case ByteCode.FCONST_0: case ByteCode.FCONST_1: case * ByteCode.FCONST_2: case ByteCode.FDIV: case ByteCode.FLOAD_0: case * ByteCode.FLOAD_1: case ByteCode.FLOAD_2: case ByteCode.FLOAD_3: case * ByteCode.FMUL: case ByteCode.FNEG: case ByteCode.FREM: case * ByteCode.FRETURN: case ByteCode.FSTORE_0: case ByteCode.FSTORE_1: case * ByteCode.FSTORE_2: case ByteCode.FSTORE_3: case ByteCode.FSUB: case * ByteCode.I2B: case ByteCode.I2C: case ByteCode.I2D: case ByteCode.I2F: * case ByteCode.I2L: case ByteCode.I2S: case ByteCode.IADD: case * ByteCode.IALOAD: case ByteCode.IAND: case ByteCode.IASTORE: case * ByteCode.ICONST_0: case ByteCode.ICONST_1: case ByteCode.ICONST_2: case * ByteCode.ICONST_3: case ByteCode.ICONST_4: case ByteCode.ICONST_5: case * ByteCode.ICONST_M1: case ByteCode.IDIV: case ByteCode.ILOAD_0: case * ByteCode.ILOAD_1: case ByteCode.ILOAD_2: case ByteCode.ILOAD_3: case * ByteCode.IMPDEP1: case ByteCode.IMPDEP2: case ByteCode.IMUL: case * ByteCode.INEG: case ByteCode.IOR: case ByteCode.IREM: case * ByteCode.IRETURN: case ByteCode.ISHL: case ByteCode.ISHR: case * ByteCode.ISTORE_0: case ByteCode.ISTORE_1: case ByteCode.ISTORE_2: case * ByteCode.ISTORE_3: case ByteCode.ISUB: case ByteCode.IUSHR: case * ByteCode.IXOR: case ByteCode.L2D: case ByteCode.L2F: case ByteCode.L2I: * case ByteCode.LADD: case ByteCode.LALOAD: case ByteCode.LAND: case * ByteCode.LASTORE: case ByteCode.LCMP: case ByteCode.LCONST_0: case * ByteCode.LCONST_1: case ByteCode.LDIV: case ByteCode.LLOAD_0: case * ByteCode.LLOAD_1: case ByteCode.LLOAD_2: case ByteCode.LLOAD_3: case * ByteCode.LMUL: case ByteCode.LNEG: case ByteCode.LOR: case ByteCode.LREM: * case ByteCode.LRETURN: case ByteCode.LSHL: case ByteCode.LSHR: case * ByteCode.LSTORE_0: case ByteCode.LSTORE_1: case ByteCode.LSTORE_2: case * ByteCode.LSTORE_3: case ByteCode.LSUB: case ByteCode.LUSHR: case * ByteCode.LXOR: case ByteCode.MONITORENTER: case ByteCode.MONITOREXIT: * case ByteCode.NOP: case ByteCode.POP2: case ByteCode.POP: case * ByteCode.RETURN: case ByteCode.SALOAD: case ByteCode.SASTORE: case * ByteCode.SWAP: case ByteCode.WIDE: return 0; * * case ByteCode.ALOAD: case ByteCode.ASTORE: case ByteCode.BIPUSH: case * ByteCode.DLOAD: case ByteCode.DSTORE: case ByteCode.FLOAD: case * ByteCode.FSTORE: case ByteCode.ILOAD: case ByteCode.ISTORE: case * ByteCode.LDC: case ByteCode.LLOAD: case ByteCode.LSTORE: case * ByteCode.NEWARRAY: case ByteCode.RET: return 1; * * case ByteCode.ANEWARRAY: case ByteCode.CHECKCAST: case ByteCode.GETFIELD: * case ByteCode.GETSTATIC: case ByteCode.GOTO: case ByteCode.IFEQ: case * ByteCode.IFGE: case ByteCode.IFGT: case ByteCode.IFLE: case * ByteCode.IFLT: case ByteCode.IFNE: case ByteCode.IFNONNULL: case * ByteCode.IFNULL: case ByteCode.IF_ACMPEQ: case ByteCode.IF_ACMPNE: case * ByteCode.IF_ICMPEQ: case ByteCode.IF_ICMPGE: case ByteCode.IF_ICMPGT: * case ByteCode.IF_ICMPLE: case ByteCode.IF_ICMPLT: case * ByteCode.IF_ICMPNE: case ByteCode.IINC: case ByteCode.INSTANCEOF: case * ByteCode.INVOKEINTERFACE: case ByteCode.INVOKESPECIAL: case * ByteCode.INVOKESTATIC: case ByteCode.INVOKEVIRTUAL: case ByteCode.JSR: * case ByteCode.LDC2_W: case ByteCode.LDC_W: case ByteCode.NEW: case * ByteCode.PUTFIELD: case ByteCode.PUTSTATIC: case ByteCode.SIPUSH: return * 2; * * case ByteCode.MULTIANEWARRAY: return 3; * * case ByteCode.GOTO_W: case ByteCode.JSR_W: return 4; * * case ByteCode.LOOKUPSWITCH: // depends on alignment case * ByteCode.TABLESWITCH: // depends on alignment return -1; } throw new * IllegalArgumentException("Bad opcode: "+opcode); } */ private static String bytecodeStr(int code) { if (DEBUGSTACK || DEBUGCODE) { switch (code) { case ByteCode.NOP: return "nop"; case ByteCode.ACONST_NULL: return "aconst_null"; case ByteCode.ICONST_M1: return "iconst_m1"; case ByteCode.ICONST_0: return "iconst_0"; case ByteCode.ICONST_1: return "iconst_1"; case ByteCode.ICONST_2: return "iconst_2"; case ByteCode.ICONST_3: return "iconst_3"; case ByteCode.ICONST_4: return "iconst_4"; case ByteCode.ICONST_5: return "iconst_5"; case ByteCode.LCONST_0: return "lconst_0"; case ByteCode.LCONST_1: return "lconst_1"; case ByteCode.FCONST_0: return "fconst_0"; case ByteCode.FCONST_1: return "fconst_1"; case ByteCode.FCONST_2: return "fconst_2"; case ByteCode.DCONST_0: return "dconst_0"; case ByteCode.DCONST_1: return "dconst_1"; case ByteCode.BIPUSH: return "bipush"; case ByteCode.SIPUSH: return "sipush"; case ByteCode.LDC: return "ldc"; case ByteCode.LDC_W: return "ldc_w"; case ByteCode.LDC2_W: return "ldc2_w"; case ByteCode.ILOAD: return "iload"; case ByteCode.LLOAD: return "lload"; case ByteCode.FLOAD: return "fload"; case ByteCode.DLOAD: return "dload"; case ByteCode.ALOAD: return "aload"; case ByteCode.ILOAD_0: return "iload_0"; case ByteCode.ILOAD_1: return "iload_1"; case ByteCode.ILOAD_2: return "iload_2"; case ByteCode.ILOAD_3: return "iload_3"; case ByteCode.LLOAD_0: return "lload_0"; case ByteCode.LLOAD_1: return "lload_1"; case ByteCode.LLOAD_2: return "lload_2"; case ByteCode.LLOAD_3: return "lload_3"; case ByteCode.FLOAD_0: return "fload_0"; case ByteCode.FLOAD_1: return "fload_1"; case ByteCode.FLOAD_2: return "fload_2"; case ByteCode.FLOAD_3: return "fload_3"; case ByteCode.DLOAD_0: return "dload_0"; case ByteCode.DLOAD_1: return "dload_1"; case ByteCode.DLOAD_2: return "dload_2"; case ByteCode.DLOAD_3: return "dload_3"; case ByteCode.ALOAD_0: return "aload_0"; case ByteCode.ALOAD_1: return "aload_1"; case ByteCode.ALOAD_2: return "aload_2"; case ByteCode.ALOAD_3: return "aload_3"; case ByteCode.IALOAD: return "iaload"; case ByteCode.LALOAD: return "laload"; case ByteCode.FALOAD: return "faload"; case ByteCode.DALOAD: return "daload"; case ByteCode.AALOAD: return "aaload"; case ByteCode.BALOAD: return "baload"; case ByteCode.CALOAD: return "caload"; case ByteCode.SALOAD: return "saload"; case ByteCode.ISTORE: return "istore"; case ByteCode.LSTORE: return "lstore"; case ByteCode.FSTORE: return "fstore"; case ByteCode.DSTORE: return "dstore"; case ByteCode.ASTORE: return "astore"; case ByteCode.ISTORE_0: return "istore_0"; case ByteCode.ISTORE_1: return "istore_1"; case ByteCode.ISTORE_2: return "istore_2"; case ByteCode.ISTORE_3: return "istore_3"; case ByteCode.LSTORE_0: return "lstore_0"; case ByteCode.LSTORE_1: return "lstore_1"; case ByteCode.LSTORE_2: return "lstore_2"; case ByteCode.LSTORE_3: return "lstore_3"; case ByteCode.FSTORE_0: return "fstore_0"; case ByteCode.FSTORE_1: return "fstore_1"; case ByteCode.FSTORE_2: return "fstore_2"; case ByteCode.FSTORE_3: return "fstore_3"; case ByteCode.DSTORE_0: return "dstore_0"; case ByteCode.DSTORE_1: return "dstore_1"; case ByteCode.DSTORE_2: return "dstore_2"; case ByteCode.DSTORE_3: return "dstore_3"; case ByteCode.ASTORE_0: return "astore_0"; case ByteCode.ASTORE_1: return "astore_1"; case ByteCode.ASTORE_2: return "astore_2"; case ByteCode.ASTORE_3: return "astore_3"; case ByteCode.IASTORE: return "iastore"; case ByteCode.LASTORE: return "lastore"; case ByteCode.FASTORE: return "fastore"; case ByteCode.DASTORE: return "dastore"; case ByteCode.AASTORE: return "aastore"; case ByteCode.BASTORE: return "bastore"; case ByteCode.CASTORE: return "castore"; case ByteCode.SASTORE: return "sastore"; case ByteCode.POP: return "pop"; case ByteCode.POP2: return "pop2"; case ByteCode.DUP: return "dup"; case ByteCode.DUP_X1: return "dup_x1"; case ByteCode.DUP_X2: return "dup_x2"; case ByteCode.DUP2: return "dup2"; case ByteCode.DUP2_X1: return "dup2_x1"; case ByteCode.DUP2_X2: return "dup2_x2"; case ByteCode.SWAP: return "swap"; case ByteCode.IADD: return "iadd"; case ByteCode.LADD: return "ladd"; case ByteCode.FADD: return "fadd"; case ByteCode.DADD: return "dadd"; case ByteCode.ISUB: return "isub"; case ByteCode.LSUB: return "lsub"; case ByteCode.FSUB: return "fsub"; case ByteCode.DSUB: return "dsub"; case ByteCode.IMUL: return "imul"; case ByteCode.LMUL: return "lmul"; case ByteCode.FMUL: return "fmul"; case ByteCode.DMUL: return "dmul"; case ByteCode.IDIV: return "idiv"; case ByteCode.LDIV: return "ldiv"; case ByteCode.FDIV: return "fdiv"; case ByteCode.DDIV: return "ddiv"; case ByteCode.IREM: return "irem"; case ByteCode.LREM: return "lrem"; case ByteCode.FREM: return "frem"; case ByteCode.DREM: return "drem"; case ByteCode.INEG: return "ineg"; case ByteCode.LNEG: return "lneg"; case ByteCode.FNEG: return "fneg"; case ByteCode.DNEG: return "dneg"; case ByteCode.ISHL: return "ishl"; case ByteCode.LSHL: return "lshl"; case By
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -