⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 opcode.java

📁 java 到c的转换程序的原代码.对喜欢C程序而不懂JAVA程序的人很有帮助
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
public static final int PUTF = 181;	// putfieldpublic static final int IVIRT = 182;	// invokevirtualpublic static final int INONV = 183;	// invokenonvirtualpublic static final int ISTAT = 184;	// invokestaticpublic static final int IINTR = 185;	// invokeinterfacepublic static final int NEW = 187;	// newpublic static final int NEWA = 188;	// newarraypublic static final int ANEWA = 189;	// anewarraypublic static final int ALEN = 190;	// arraylengthpublic static final int THROW = 191;	// athrowpublic static final int ACAST = 192;	// checkcastpublic static final int INSTC = 193;	// instanceofpublic static final int MENTR = 194;	// monitorenterpublic static final int MEXIT = 195;	// monitorexitpublic static final int MNEWA = 197;	// multianewarraypublic static final int BPOINT = 202;  // breakpointpublic static final int WIDE = 196;	// wide (special instruction form)//  opcode table initializationstatic {    table = new Opcode[256];    //  op len kind  pop push   name               var flags    op(ACONST_NULL, 1, CONST, 0, "a",   "aconst_null",      0, 0);    op(ICONST_M1,   1, CONST, 0, "i",   "iconst_m1",       -1, 0);    op(ICONST_0,    1, CONST, 0, "i",   "iconst_0",         0, 0);    op(ICONST_1,    1, CONST, 0, "i",   "iconst_1",         1, 0);    op(ICONST_2,    1, CONST, 0, "i",   "iconst_2",         2, 0);    op(ICONST_3,    1, CONST, 0, "i",   "iconst_3",         3, 0);    op(ICONST_4,    1, CONST, 0, "i",   "iconst_4",         4, 0);    op(ICONST_5,    1, CONST, 0, "i",   "iconst_5",         5, 0);    op(LCONST_0,    1, CONST, 0, "xl",  "lconst_0",         0, 0);    op(LCONST_1,    1, CONST, 0, "xl",  "lconst_1",         1, 0);    op(FCONST_0,    1, CONST, 0, "f",   "fconst_0",         0, 0);    op(FCONST_1,    1, CONST, 0, "f",   "fconst_1",         1, 0);    op(FCONST_2,    1, CONST, 0, "f",   "fconst_2",         2, 0);    op(DCONST_0,    1, CONST, 0, "xd",  "dconst_0",         0, 0);    op(DCONST_1,    1, CONST, 0, "xd",  "dconst_1",         1, 0);    op(BIPUSH,      2, CONST, 0, "i",   "bipush",           0, I8);    op(SIPUSH,      3, CONST, 0, "i",   "sipush",           0, I16);    op(LDC,         2, LDC,   0, "*",   "ldc",              0, CTAB + U8);    op(LDC_W,       3, LDC,   0, "*",   "ldc_w",            0, CTAB + U16);    op(LDC2_W,      3, LDC,   0, "x*",  "ldc2_w",           0, CTAB + U16);    op(ILOAD,   2, LOAD,  0, "i",   "iload",            0, U8);    op(ILOAD_0, 1, LOAD,  0, "i",   "iload_0",          0, 0);    op(ILOAD_1, 1, LOAD,  0, "i",   "iload_1",          1, 0);    op(ILOAD_2, 1, LOAD,  0, "i",   "iload_2",          2, 0);    op(ILOAD_3, 1, LOAD,  0, "i",   "iload_3",          3, 0);    op(LLOAD,   2, LOAD,  0, "xl",  "lload",            0, U8);    op(LLOAD_0, 1, LOAD,  0, "xl",  "lload_0",          0, 0);    op(LLOAD_1, 1, LOAD,  0, "xl",  "lload_1",          1, 0);    op(LLOAD_2, 1, LOAD,  0, "xl",  "lload_2",          2, 0);    op(LLOAD_3, 1, LOAD,  0, "xl",  "lload_3",          3, 0);    op(FLOAD,   2, LOAD,  0, "f",   "fload",            0, U8);    op(FLOAD_0, 1, LOAD,  0, "f",   "fload_0",          0, 0);    op(FLOAD_1, 1, LOAD,  0, "f",   "fload_1",          1, 0);    op(FLOAD_2, 1, LOAD,  0, "f",   "fload_2",          2, 0);    op(FLOAD_3, 1, LOAD,  0, "f",   "fload_3",          3, 0);    op(DLOAD,   2, LOAD,  0, "xd",  "dload",            0, U8);    op(DLOAD_0, 1, LOAD,  0, "xd",  "dload_0",          0, 0);    op(DLOAD_1, 1, LOAD,  0, "xd",  "dload_1",          1, 0);    op(DLOAD_2, 1, LOAD,  0, "xd",  "dload_2",          2, 0);    op(DLOAD_3, 1, LOAD,  0, "xd",  "dload_3",          3, 0);    op(ALOAD,   2, LOAD,  0, "a",   "aload",            0, U8);    op(ALOAD_0, 1, LOAD,  0, "a",   "aload_0",          0, 0);    op(ALOAD_1, 1, LOAD,  0, "a",   "aload_1",          1, 0);    op(ALOAD_2, 1, LOAD,  0, "a",   "aload_2",          2, 0);    op(ALOAD_3, 1, LOAD,  0, "a",   "aload_3",          3, 0);    op(ISTORE,   2, STORE, 1, "",    "istore",           0, U8);    op(ISTORE_0, 1, STORE, 1, "",    "istore_0",         0, 0);    op(ISTORE_1, 1, STORE, 1, "",    "istore_1",         1, 0);    op(ISTORE_2, 1, STORE, 1, "",    "istore_2",         2, 0);    op(ISTORE_3, 1, STORE, 1, "",    "istore_3",         3, 0);    op(LSTORE,   2, STORE, 2, "",    "lstore",           0, U8);    op(LSTORE_0, 1, STORE, 2, "",    "lstore_0",         0, 0);    op(LSTORE_1, 1, STORE, 2, "",    "lstore_1",         1, 0);    op(LSTORE_2, 1, STORE, 2, "",    "lstore_2",         2, 0);    op(LSTORE_3, 1, STORE, 2, "",    "lstore_3",         3, 0);    op(FSTORE,   2, STORE, 1, "",    "fstore",           0, U8);    op(FSTORE_0, 1, STORE, 1, "",    "fstore_0",         0, 0);    op(FSTORE_1, 1, STORE, 1, "",    "fstore_1",         1, 0);    op(FSTORE_2, 1, STORE, 1, "",    "fstore_2",         2, 0);    op(FSTORE_3, 1, STORE, 1, "",    "fstore_3",         3, 0);    op(DSTORE,   2, STORE, 2, "",    "dstore",           0, U8);    op(DSTORE_0, 1, STORE, 2, "",    "dstore_0",         0, 0);    op(DSTORE_1, 1, STORE, 2, "",    "dstore_1",         1, 0);    op(DSTORE_2, 1, STORE, 2, "",    "dstore_2",         2, 0);    op(DSTORE_3, 1, STORE, 2, "",    "dstore_3",         3, 0);    op(ASTORE,   2, STORE, 1, "",    "astore",           0, U8);    op(ASTORE_0, 1, STORE, 1, "",    "astore_0",         0, 0);    op(ASTORE_1, 1, STORE, 1, "",    "astore_1",         1, 0);    op(ASTORE_2, 1, STORE, 1, "",    "astore_2",         2, 0);    op(ASTORE_3, 1, STORE, 1, "",    "astore_3",         3, 0);    op(IINC, 3, IINC,  0, "",    "iinc",             0, U8 + MORE);    op(GETS, 3, GETS,  0, "*",   "getstatic",        0, CTAB + U16);    op(PUTS, 3, PUTS,  1, "",    "putstatic",        0, CTAB + U16);    op(GETF, 3, GETF,  1, "*",   "getfield",         0, CTAB + U16);    op(PUTF, 3, PUTF,  2, "",    "putfield",         0, CTAB + U16);    op(NEW,   3, NEW,   0, "a",   "new",              0, CTAB + U16);    op(ACAST, 3, ACAST, 0, "",    "checkcast",        0, INST + CTAB + U16);    op(INSTC, 3, INSTC, 1, "i",   "instanceof",       0, INST + CTAB + U16);    op(NEWA,   2, NEWA,       1, "a",  "newarray",       0, U8);    op(ANEWA,  3, ANEWA,      1, "a",  "anewarray",      0, CTAB + U16);    op(MNEWA,  4, MNEWA,      0, "a",  "multianewarray", 0, CTAB + U16 +MORE);    op(ALEN,   1, ALEN,       1, "i",  "arraylength",    0, 0);    op(IALOAD, 1, ARRAYLOAD,  2, "i",  "iaload",         0, 0);    op(LALOAD, 1, ARRAYLOAD,  2, "xl", "laload",         0, 0);    op(FALOAD, 1, ARRAYLOAD,  2, "f",  "faload",         0, 0);    op(DALOAD, 1, ARRAYLOAD,  2, "xd", "daload",         0, 0);    op(AALOAD, 1, ARRAYLOAD,  2, "a",  "aaload",         0, 0);    op(BALOAD, 1, ARRAYLOAD,  2, "i",  "baload",         0, 0);    op(CALOAD, 1, ARRAYLOAD,  2, "i",  "caload",         0, 0);    op(SALOAD, 1, ARRAYLOAD,  2, "i",  "saload",         0, 0);    op(IASTOR, 1, ARRAYSTORE, 3, "",   "iastore",        0, 0);    op(LASTOR, 1, ARRAYSTORE, 4, "",   "lastore",        0, 0);    op(FASTOR, 1, ARRAYSTORE, 3, "",   "fastore",        0, 0);    op(DASTOR, 1, ARRAYSTORE, 4, "",   "dastore",        0, 0);    op(AASTOR, 1, ARRAYSTORE, 3, "",   "aastore",        0, INST);    op(BASTOR, 1, ARRAYSTORE, 3, "",   "bastore",        0, 0);    op(CASTOR, 1, ARRAYSTORE, 3, "",   "castore",        0, 0);    op(SASTOR, 1, ARRAYSTORE, 3, "",   "sastore",        0, 0);    op(NOP,    1, NOP,   0, "",    "nop",              0, 0);    op(POP,    1, NOP,   1, "",    "pop",              0, 0);    op(POP2,   1, NOP,   2, "",    "pop2",             0, 0);    op(DUP,    1, DUP,   0, "*",   "dup",              0, 0);    op(DUPX1,  1, DUPX1, 0, "*",   "dup_x1",           0, 0);    op(DUPX2,  1, DUPX2, 0, "*",   "dup_x2",           0, 0);    op(DUP2,   1, DUP2,  0, "**",  "dup2",             0, 0);    op(D2X1,   1, D2X1,  0, "**",  "dup2_x1",          0, 0);    op(D2X2,   1, D2X2,  0, "**",  "dup2_x2",          0, 0);    op(SWAP,   1, SWAP,  0, "**",  "swap",             0, 0);    op(INEG, 	  1, UNOP,  1, "i",   "ineg",             "-", 0);    op(LNEG, 	  1, UNOP,  2, "xl",  "lneg",             "-", 0);    op(FNEG, 	  1, UNOP,  1, "f",   "fneg",             "-", 0);    op(DNEG, 	  1, UNOP,  2, "xd",  "dneg",             "-", 0);    op(I2L,  	  1, UNOP,  1, "xl",  "i2l",              "", 0);    op(I2F,  	  1, UNOP,  1, "f",   "i2f",              "", 0);    op(I2D,  	  1, UNOP,  1, "xd",  "i2d",              "", 0);    op(L2I,  	  1, UNOP,  2, "i",   "l2i",              "", 0);    op(L2F,  	  1, UNOP,  2, "f",   "l2f",              "", 0);    op(L2D,  	  1, UNOP,  2, "xd",  "l2d",              "", 0);    op(F2I, 	  1, FTOI,  1, "i",   "f2i",              "dtoi", 0);    op(F2L, 	  1, FTOI,  1, "xl",  "f2l",              "dtol", 0);    op(F2D, 	  1, UNOP,  1, "xd",  "f2d",              "", 0);    op(D2I, 	  1, FTOI,  2, "i",   "d2i",              "dtoi", 0);    op(D2L, 	  1, FTOI,  2, "xl",  "d2l",              "dtol", 0);    op(D2F, 	  1, UNOP,  2, "f",   "d2f",              "", 0);    op(INT2BYTE,  1, UNOP,  1, "i",   "int2byte",         "(Byte)", 0);    op(INT2CHAR,  1, UNOP,  1, "i",   "int2char",         "(Char)", 0);    op(INT2SHORT, 1, UNOP,  1, "i",   "int2short",        "(Short)", 0);    op(IADD,  1, BINOP, 2, "i",   "iadd",             " + ", 0);    op(LADD,  1, BINOP, 4, "xl",  "ladd",             " + ", 0);    op(FADD,  1, BINOP, 2, "f",   "fadd",             " + ", 0);    op(DADD,  1, BINOP, 4, "xd",  "dadd",             " + ", 0);    op(ISUB,  1, BINOP, 2, "i",   "isub",             " - ", 0);    op(LSUB,  1, BINOP, 4, "xl",  "lsub",             " - ", 0);    op(FSUB,  1, BINOP, 2, "f",   "fsub",             " - ", 0);    op(DSUB,  1, BINOP, 4, "xd",  "dsub",             " - ", 0);    op(IMUL,  1, BINOP, 2, "i",   "imul",             " * ", 0);    op(LMUL,  1, BINOP, 4, "xl",  "lmul",             " * ", 0);    op(FMUL,  1, BINOP, 2, "f",   "fmul",             " * ", 0);    op(DMUL,  1, BINOP, 4, "xd",  "dmul",             " * ", 0);    op(IDIV,  1, DIVOP, 2, "i",   "idiv",             " / ", 0);    op(LDIV,  1, DIVOP, 4, "xl",  "ldiv",             " / ", 0);    op(FDIV,  1, BINOP, 2, "f",   "fdiv",             " / ", 0);    op(DDIV,  1, BINOP, 4, "xd",  "ddiv",             " / ", 0);    op(IREM,  1, DIVOP, 2, "i",   "irem",             " % ", 0);    op(LREM,  1, DIVOP, 4, "xl",  "lrem",             " % ", 0);    op(FREM,  1, FREM,  2, "f",   "frem",             " % ", 0);    op(DREM,  1, FREM,  4, "xd",  "drem",             " % ", 0);    op(IAND,  1, BINOP, 2, "i",   "iand",             " & ", 0);    op(LAND,  1, BINOP, 4, "xl",  "land",             " & ", 0);    op(IOR,   1, BINOP, 2, "i",   "ior",              " | ", 0);    op(LOR,   1, BINOP, 4, "xl",  "lor",              " | ", 0);    op(IXOR,  1, BINOP, 2, "i",   "ixor",             " ^ ", 0);    op(LXOR,  1, BINOP, 4, "xl",  "lxor",             " ^ ", 0);    op(ISHL,  1, SHIFT, 2, "i",   "ishl",             " << ", 0);    op(ISHR,  1, SHIFT, 2, "i",   "ishr",             " >> ", 0);    op(IUSHR, 1, SHIFT, 2, "i",   "iushr",            " >> ", UNS);    op(LSHL,  1, SHIFT, 3, "xl",  "lshl",             " << ", 0);    op(LSHR,  1, SHIFT, 3, "xl",  "lshr",             " >> ", 0);    op(LUSHR, 1, SHIFT, 3, "xl",  "lushr",            " >> ", UNS);    op(LCMP,  	  1, CMP,   4, "i",   "lcmp",             0, 0);    op(FCMPL, 	  1, CMP,   2, "i",   "fcmpl",            -1, 0);    op(FCMPG, 	  1, CMP,   2, "i",   "fcmpg",            +1, 0);    op(DCMPL, 	  1, CMP,   4, "i",   "dcmpl",            -1, 0);    op(DCMPG, 	  1, CMP,   4, "i",   "dcmpg",            +1, 0);    op(IFNULL,    3, IFZRO, 1, "",    "ifnull",           " == ", PC + I16);    op(IFEQ, 	  3, IFZRO, 1, "",    "ifeq",             " == ", PC + I16);    op(IFLT, 	  3, IFZRO, 1, "",    "iflt",             " < ",  PC + I16);    op(IFLE, 	  3, IFZRO, 1, "",    "ifle",             " <= ", PC + I16);    op(IFNE, 	  3, IFZRO, 1, "",    "ifne",             " != ", PC + I16);    op(IFNONNULL, 3, IFZRO, 1, "",    "ifnonnull",        " != ", PC + I16);    op(IFGT,      3, IFZRO, 1, "",    "ifgt",             " > ",  PC + I16);    op(IFGE,      3, IFZRO, 1, "",    "ifge",             " >= ", PC + I16);    op(IF_ICMPEQ, 3, IFCMP, 2, "",    "if_icmpeq",        " == ", PC + I16);    op(IF_ICMPNE, 3, IFCMP, 2, "",    "if_icmpne",        " != ", PC + I16);    op(IF_ICMPLT, 3, IFCMP, 2, "",    "if_icmplt",        " < ",  PC + I16);    op(IF_ICMPGT, 3, IFCMP, 2, "",    "if_icmpgt",        " > ",  PC + I16);    op(IF_ICMPLE, 3, IFCMP, 2, "",    "if_icmple",        " <= ", PC + I16);    op(IF_ICMPGE, 3, IFCMP, 2, "",    "if_icmpge",        " >= ", PC + I16);    op(IF_ACMPEQ, 3, IFCMP, 2, "",    "if_acmpeq",        " == ", PC + I16);    op(IF_ACMPNE, 3, IFCMP, 2, "",    "if_acmpne",        " != ", PC + I16);    op(TBLSW,  0, TBLSW, 1, "",    "tableswitch",      0, NFT + SWCH + MORE);    op(LKPSW,  0, LKPSW, 1, "",    "lookupswitch",     0, NFT + SWCH + MORE);    op(GOTO,   3, GOTO,  0, "",    "goto",             0, NFT + PC + I16);    op(GOTO_W, 5, GOTO,  0, "",    "goto_w",           0, NFT + PC + I32);    op(JSR,    3, JSR,   0, "",    "jsr",              0, JSRI + PC + I16);    op(JSR_W,  5, JSR,   0, "",    "jsr_w",            0, JSRI + PC + I32);    op(RET,    2, RET,   0, "",    "ret",              0, NFT + U8);    op(IVIRT, 	3, IVIRT, 1, "",    "invokevirtual",    0, CTAB + U16);    op(INONV, 	3, INONV, 1, "",    "invokenonvirtual", 0, CTAB + U16);    op(ISTAT, 	3, ISTAT, 0, "",    "invokestatic",     0, CTAB + U16);    op(IINTR, 	5, IINTR, 1, "",    "invokeinterface",  0, CTAB + U16 + MORE);    op(IRETURN, 1, RETV,  0, "",    "ireturn",          0, NFT);    op(LRETURN, 1, RETV,  0, "",    "lreturn",          0, NFT);    op(FRETURN, 1, RETV,  0, "",    "freturn",          0, NFT);    op(DRETURN, 1, RETV,  0, "",    "dreturn",          0, NFT);    op(ARETURN, 1, RETV,  0, "",    "areturn",          0, NFT);    op(RETRN,   1, RETRN, 0, "",    "return",           0, NFT);    op(THROW, 1, THROW, 1, "",    "athrow",           0, NFT);    op(BPOINT,1, NOP,   0, "",    "breakpoint",       0, 0);    op(MENTR, 1, MENTR, 1, "",    "monitorenter",     0, 0);    op(MEXIT, 1, MEXIT, 1, "",    "monitorexit",      0, 0);    op(WIDE, 0, WIDE,  0, "",    "wide",	            0, 0);}//  op(code,length,kind,pop,push,name,var,flags) -- initialize opcode entrystatic private void op (int code, int length, int kind, int pop, String push,    String name, int var, int flags){    Opcode o = new Opcode();    table[code] = o;    o.code = code;    o.length = length;    o.kind = kind;    o.pop = pop;    o.push = push;    o.name = name;    o.var = var;    o.flags = flags;}//  op(code,length,kind,pop,push,name,opr,flags) -- initialize special entry////  Used with a String "opr" in place of the "var" parameter.static private void op (int code, int length, int kind, int pop, String push,    String name, String opr, int flags){    op(code, length, kind, pop, push, name, 0, flags);    table[code].opr = opr;}public static OpcodelookupOpcode (int opc){    return table [opc];}public synchronized final StringtoString (){    return name;}} // class Opcode

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -