001: /*
002: * Javassist, a Java-bytecode translator toolkit.
003: * Copyright (C) 1999-2006 Shigeru Chiba. All Rights Reserved.
004: *
005: * The contents of this file are subject to the Mozilla Public License Version
006: * 1.1 (the "License"); you may not use this file except in compliance with
007: * the License. Alternatively, the contents of this file may be used under
008: * the terms of the GNU Lesser General Public License Version 2.1 or later.
009: *
010: * Software distributed under the License is distributed on an "AS IS" basis,
011: * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
012: * for the specific language governing rights and limitations under the
013: * License.
014: */
015:
016: package javassist.bytecode;
017:
018: /**
019: * JVM Instruction Names.
020: *
021: * <p>This interface has been separated from javassist.bytecode.Opcode
022: * because typical bytecode translators do not use mnemonics. If this
023: * interface were merged with Opcode, extra memory would be unnecessary
024: * consumed.
025: *
026: * @see Opcode
027: */
028: public interface Mnemonic {
029:
030: /**
031: * The instruction names (mnemonics) sorted by the opcode.
032: * The length of this array is 202 (jsr_w=201).
033: *
034: * <p>The value at index 186 is null since no instruction is
035: * assigned to 186.
036: */
037: String[] OPCODE = { "nop", /* 0*/
038: "aconst_null", /* 1*/
039: "iconst_m1", /* 2*/
040: "iconst_0", /* 3*/
041: "iconst_1", /* 4*/
042: "iconst_2", /* 5*/
043: "iconst_3", /* 6*/
044: "iconst_4", /* 7*/
045: "iconst_5", /* 8*/
046: "lconst_0", /* 9*/
047: "lconst_1", /* 10*/
048: "fconst_0", /* 11*/
049: "fconst_1", /* 12*/
050: "fconst_2", /* 13*/
051: "dconst_0", /* 14*/
052: "dconst_1", /* 15*/
053: "bipush", /* 16*/
054: "sipush", /* 17*/
055: "ldc", /* 18*/
056: "ldc_w", /* 19*/
057: "ldc2_w", /* 20*/
058: "iload", /* 21*/
059: "lload", /* 22*/
060: "fload", /* 23*/
061: "dload", /* 24*/
062: "aload", /* 25*/
063: "iload_0", /* 26*/
064: "iload_1", /* 27*/
065: "iload_2", /* 28*/
066: "iload_3", /* 29*/
067: "lload_0", /* 30*/
068: "lload_1", /* 31*/
069: "lload_2", /* 32*/
070: "lload_3", /* 33*/
071: "fload_0", /* 34*/
072: "fload_1", /* 35*/
073: "fload_2", /* 36*/
074: "fload_3", /* 37*/
075: "dload_0", /* 38*/
076: "dload_1", /* 39*/
077: "dload_2", /* 40*/
078: "dload_3", /* 41*/
079: "aload_0", /* 42*/
080: "aload_1", /* 43*/
081: "aload_2", /* 44*/
082: "aload_3", /* 45*/
083: "iaload", /* 46*/
084: "laload", /* 47*/
085: "faload", /* 48*/
086: "daload", /* 49*/
087: "aaload", /* 50*/
088: "baload", /* 51*/
089: "caload", /* 52*/
090: "saload", /* 53*/
091: "istore", /* 54*/
092: "lstore", /* 55*/
093: "fstore", /* 56*/
094: "dstore", /* 57*/
095: "astore", /* 58*/
096: "istore_0", /* 59*/
097: "istore_1", /* 60*/
098: "istore_2", /* 61*/
099: "istore_3", /* 62*/
100: "lstore_0", /* 63*/
101: "lstore_1", /* 64*/
102: "lstore_2", /* 65*/
103: "lstore_3", /* 66*/
104: "fstore_0", /* 67*/
105: "fstore_1", /* 68*/
106: "fstore_2", /* 69*/
107: "fstore_3", /* 70*/
108: "dstore_0", /* 71*/
109: "dstore_1", /* 72*/
110: "dstore_2", /* 73*/
111: "dstore_3", /* 74*/
112: "astore_0", /* 75*/
113: "astore_1", /* 76*/
114: "astore_2", /* 77*/
115: "astore_3", /* 78*/
116: "iastore", /* 79*/
117: "lastore", /* 80*/
118: "fastore", /* 81*/
119: "dastore", /* 82*/
120: "aastore", /* 83*/
121: "bastore", /* 84*/
122: "castore", /* 85*/
123: "sastore", /* 86*/
124: "pop", /* 87*/
125: "pop2", /* 88*/
126: "dup", /* 89*/
127: "dup_x1", /* 90*/
128: "dup_x2", /* 91*/
129: "dup2", /* 92*/
130: "dup2_x1", /* 93*/
131: "dup2_x2", /* 94*/
132: "swap", /* 95*/
133: "iadd", /* 96*/
134: "ladd", /* 97*/
135: "fadd", /* 98*/
136: "dadd", /* 99*/
137: "isub", /* 100*/
138: "lsub", /* 101*/
139: "fsub", /* 102*/
140: "dsub", /* 103*/
141: "imul", /* 104*/
142: "lmul", /* 105*/
143: "fmul", /* 106*/
144: "dmul", /* 107*/
145: "idiv", /* 108*/
146: "ldiv", /* 109*/
147: "fdiv", /* 110*/
148: "ddiv", /* 111*/
149: "irem", /* 112*/
150: "lrem", /* 113*/
151: "frem", /* 114*/
152: "drem", /* 115*/
153: "ineg", /* 116*/
154: "lneg", /* 117*/
155: "fneg", /* 118*/
156: "dneg", /* 119*/
157: "ishl", /* 120*/
158: "lshl", /* 121*/
159: "ishr", /* 122*/
160: "lshr", /* 123*/
161: "iushr", /* 124*/
162: "lushr", /* 125*/
163: "iand", /* 126*/
164: "land", /* 127*/
165: "ior", /* 128*/
166: "lor", /* 129*/
167: "ixor", /* 130*/
168: "lxor", /* 131*/
169: "iinc", /* 132*/
170: "i2l", /* 133*/
171: "i2f", /* 134*/
172: "i2d", /* 135*/
173: "l2i", /* 136*/
174: "l2f", /* 137*/
175: "l2d", /* 138*/
176: "f2i", /* 139*/
177: "f2l", /* 140*/
178: "f2d", /* 141*/
179: "d2i", /* 142*/
180: "d2l", /* 143*/
181: "d2f", /* 144*/
182: "i2b", /* 145*/
183: "i2c", /* 146*/
184: "i2s", /* 147*/
185: "lcmp", /* 148*/
186: "fcmpl", /* 149*/
187: "fcmpg", /* 150*/
188: "dcmpl", /* 151*/
189: "dcmpg", /* 152*/
190: "ifeq", /* 153*/
191: "ifne", /* 154*/
192: "iflt", /* 155*/
193: "ifge", /* 156*/
194: "ifgt", /* 157*/
195: "ifle", /* 158*/
196: "if_icmpeq", /* 159*/
197: "if_icmpne", /* 160*/
198: "if_icmplt", /* 161*/
199: "if_icmpge", /* 162*/
200: "if_icmpgt", /* 163*/
201: "if_icmple", /* 164*/
202: "if_acmpeq", /* 165*/
203: "if_acmpne", /* 166*/
204: "goto", /* 167*/
205: "jsr", /* 168*/
206: "ret", /* 169*/
207: "tableswitch", /* 170*/
208: "lookupswitch", /* 171*/
209: "ireturn", /* 172*/
210: "lreturn", /* 173*/
211: "freturn", /* 174*/
212: "dreturn", /* 175*/
213: "areturn", /* 176*/
214: "return", /* 177*/
215: "getstatic", /* 178*/
216: "putstatic", /* 179*/
217: "getfield", /* 180*/
218: "putfield", /* 181*/
219: "invokevirtual", /* 182*/
220: "invokespecial", /* 183*/
221: "invokestatic", /* 184*/
222: "invokeinterface", /* 185*/
223: null, "new", /* 187*/
224: "newarray", /* 188*/
225: "anewarray", /* 189*/
226: "arraylength", /* 190*/
227: "athrow", /* 191*/
228: "checkcast", /* 192*/
229: "instanceof", /* 193*/
230: "monitorenter", /* 194*/
231: "monitorexit", /* 195*/
232: "wide", /* 196*/
233: "multianewarray", /* 197*/
234: "ifnull", /* 198*/
235: "ifnonnull", /* 199*/
236: "goto_w", /* 200*/
237: "jsr_w" /* 201*/
238: };
239: }
|