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