001: /***
002: * ASM: a very small and fast Java bytecode manipulation framework
003: * Copyright (C) 2000 INRIA, France Telecom
004: * Copyright (C) 2002 France Telecom
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2 of the License, or (at your option) any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
019: *
020: * Contact: Eric.Bruneton@rd.francetelecom.com
021: *
022: * Author: Eric Bruneton
023: */package bsh.org.objectweb.asm;
024:
025: /**
026: * Defines the JVM opcodes, access flags and array type codes. This interface
027: * does not define all the JVM opcodes because some opcodes are automatically
028: * handled. For example, the xLOAD and xSTORE opcodes are automatically replaced
029: * by xLOAD_n and xSTORE_n opcodes when possible. The xLOAD_n and xSTORE_n
030: * opcodes are therefore not defined in this interface. Likewise for LDC,
031: * automatically replaced by LDC_W or LDC2_W when necessary, WIDE, GOTO_W and
032: * JSR_W.
033: */
034:
035: public interface Constants {
036:
037: // access flags
038:
039: int ACC_PUBLIC = 1;
040: int ACC_PRIVATE = 2;
041: int ACC_PROTECTED = 4;
042: int ACC_STATIC = 8;
043: int ACC_FINAL = 16;
044: int ACC_SYNCHRONIZED = 32;
045: int ACC_VOLATILE = 64;
046: int ACC_TRANSIENT = 128;
047: int ACC_NATIVE = 256;
048: int ACC_INTERFACE = 512;
049: int ACC_ABSTRACT = 1024;
050: int ACC_STRICT = 2048;
051: int ACC_SUPER = 32;
052:
053: int ACC_SYNTHETIC = 65536;
054: int ACC_DEPRECATED = 131072;
055:
056: // types for NEWARRAY
057:
058: int T_BOOLEAN = 4;
059: int T_CHAR = 5;
060: int T_FLOAT = 6;
061: int T_DOUBLE = 7;
062: int T_BYTE = 8;
063: int T_SHORT = 9;
064: int T_INT = 10;
065: int T_LONG = 11;
066:
067: // opcodes // visit method (- = idem)
068:
069: int NOP = 0; // visitInsn
070: int ACONST_NULL = 1; // -
071: int ICONST_M1 = 2; // -
072: int ICONST_0 = 3; // -
073: int ICONST_1 = 4; // -
074: int ICONST_2 = 5; // -
075: int ICONST_3 = 6; // -
076: int ICONST_4 = 7; // -
077: int ICONST_5 = 8; // -
078: int LCONST_0 = 9; // -
079: int LCONST_1 = 10; // -
080: int FCONST_0 = 11; // -
081: int FCONST_1 = 12; // -
082: int FCONST_2 = 13; // -
083: int DCONST_0 = 14; // -
084: int DCONST_1 = 15; // -
085: int BIPUSH = 16; // visitIntInsn
086: int SIPUSH = 17; // -
087: int LDC = 18; // visitLdcInsn
088: //int LDC_W = 19; // -
089: //int LDC2_W = 20; // -
090: int ILOAD = 21; // visitVarInsn
091: int LLOAD = 22; // -
092: int FLOAD = 23; // -
093: int DLOAD = 24; // -
094: int ALOAD = 25; // -
095: //int ILOAD_0 = 26; // -
096: //int ILOAD_1 = 27; // -
097: //int ILOAD_2 = 28; // -
098: //int ILOAD_3 = 29; // -
099: //int LLOAD_0 = 30; // -
100: //int LLOAD_1 = 31; // -
101: //int LLOAD_2 = 32; // -
102: //int LLOAD_3 = 33; // -
103: //int FLOAD_0 = 34; // -
104: //int FLOAD_1 = 35; // -
105: //int FLOAD_2 = 36; // -
106: //int FLOAD_3 = 37; // -
107: //int DLOAD_0 = 38; // -
108: //int DLOAD_1 = 39; // -
109: //int DLOAD_2 = 40; // -
110: //int DLOAD_3 = 41; // -
111: //int ALOAD_0 = 42; // -
112: //int ALOAD_1 = 43; // -
113: //int ALOAD_2 = 44; // -
114: //int ALOAD_3 = 45; // -
115: int IALOAD = 46; // visitInsn
116: int LALOAD = 47; // -
117: int FALOAD = 48; // -
118: int DALOAD = 49; // -
119: int AALOAD = 50; // -
120: int BALOAD = 51; // -
121: int CALOAD = 52; // -
122: int SALOAD = 53; // -
123: int ISTORE = 54; // visitVarInsn
124: int LSTORE = 55; // -
125: int FSTORE = 56; // -
126: int DSTORE = 57; // -
127: int ASTORE = 58; // -
128: //int ISTORE_0 = 59; // -
129: //int ISTORE_1 = 60; // -
130: //int ISTORE_2 = 61; // -
131: //int ISTORE_3 = 62; // -
132: //int LSTORE_0 = 63; // -
133: //int LSTORE_1 = 64; // -
134: //int LSTORE_2 = 65; // -
135: //int LSTORE_3 = 66; // -
136: //int FSTORE_0 = 67; // -
137: //int FSTORE_1 = 68; // -
138: //int FSTORE_2 = 69; // -
139: //int FSTORE_3 = 70; // -
140: //int DSTORE_0 = 71; // -
141: //int DSTORE_1 = 72; // -
142: //int DSTORE_2 = 73; // -
143: //int DSTORE_3 = 74; // -
144: //int ASTORE_0 = 75; // -
145: //int ASTORE_1 = 76; // -
146: //int ASTORE_2 = 77; // -
147: //int ASTORE_3 = 78; // -
148: int IASTORE = 79; // visitInsn
149: int LASTORE = 80; // -
150: int FASTORE = 81; // -
151: int DASTORE = 82; // -
152: int AASTORE = 83; // -
153: int BASTORE = 84; // -
154: int CASTORE = 85; // -
155: int SASTORE = 86; // -
156: int POP = 87; // -
157: int POP2 = 88; // -
158: int DUP = 89; // -
159: int DUP_X1 = 90; // -
160: int DUP_X2 = 91; // -
161: int DUP2 = 92; // -
162: int DUP2_X1 = 93; // -
163: int DUP2_X2 = 94; // -
164: int SWAP = 95; // -
165: int IADD = 96; // -
166: int LADD = 97; // -
167: int FADD = 98; // -
168: int DADD = 99; // -
169: int ISUB = 100; // -
170: int LSUB = 101; // -
171: int FSUB = 102; // -
172: int DSUB = 103; // -
173: int IMUL = 104; // -
174: int LMUL = 105; // -
175: int FMUL = 106; // -
176: int DMUL = 107; // -
177: int IDIV = 108; // -
178: int LDIV = 109; // -
179: int FDIV = 110; // -
180: int DDIV = 111; // -
181: int IREM = 112; // -
182: int LREM = 113; // -
183: int FREM = 114; // -
184: int DREM = 115; // -
185: int INEG = 116; // -
186: int LNEG = 117; // -
187: int FNEG = 118; // -
188: int DNEG = 119; // -
189: int ISHL = 120; // -
190: int LSHL = 121; // -
191: int ISHR = 122; // -
192: int LSHR = 123; // -
193: int IUSHR = 124; // -
194: int LUSHR = 125; // -
195: int IAND = 126; // -
196: int LAND = 127; // -
197: int IOR = 128; // -
198: int LOR = 129; // -
199: int IXOR = 130; // -
200: int LXOR = 131; // -
201: int IINC = 132; // visitIincInsn
202: int I2L = 133; // visitInsn
203: int I2F = 134; // -
204: int I2D = 135; // -
205: int L2I = 136; // -
206: int L2F = 137; // -
207: int L2D = 138; // -
208: int F2I = 139; // -
209: int F2L = 140; // -
210: int F2D = 141; // -
211: int D2I = 142; // -
212: int D2L = 143; // -
213: int D2F = 144; // -
214: int I2B = 145; // -
215: int I2C = 146; // -
216: int I2S = 147; // -
217: int LCMP = 148; // -
218: int FCMPL = 149; // -
219: int FCMPG = 150; // -
220: int DCMPL = 151; // -
221: int DCMPG = 152; // -
222: int IFEQ = 153; // visitJumpInsn
223: int IFNE = 154; // -
224: int IFLT = 155; // -
225: int IFGE = 156; // -
226: int IFGT = 157; // -
227: int IFLE = 158; // -
228: int IF_ICMPEQ = 159; // -
229: int IF_ICMPNE = 160; // -
230: int IF_ICMPLT = 161; // -
231: int IF_ICMPGE = 162; // -
232: int IF_ICMPGT = 163; // -
233: int IF_ICMPLE = 164; // -
234: int IF_ACMPEQ = 165; // -
235: int IF_ACMPNE = 166; // -
236: int GOTO = 167; // -
237: int JSR = 168; // -
238: int RET = 169; // visitVarInsn
239: int TABLESWITCH = 170; // visiTableSwitchInsn
240: int LOOKUPSWITCH = 171; // visitLookupSwitch
241: int IRETURN = 172; // visitInsn
242: int LRETURN = 173; // -
243: int FRETURN = 174; // -
244: int DRETURN = 175; // -
245: int ARETURN = 176; // -
246: int RETURN = 177; // -
247: int GETSTATIC = 178; // visitFieldInsn
248: int PUTSTATIC = 179; // -
249: int GETFIELD = 180; // -
250: int PUTFIELD = 181; // -
251: int INVOKEVIRTUAL = 182; // visitMethodInsn
252: int INVOKESPECIAL = 183; // -
253: int INVOKESTATIC = 184; // -
254: int INVOKEINTERFACE = 185; // -
255: //int UNUSED = 186; // NOT VISITED
256: int NEW = 187; // visitTypeInsn
257: int NEWARRAY = 188; // visitIntInsn
258: int ANEWARRAY = 189; // visitTypeInsn
259: int ARRAYLENGTH = 190; // visitInsn
260: int ATHROW = 191; // -
261: int CHECKCAST = 192; // visitTypeInsn
262: int INSTANCEOF = 193; // -
263: int MONITORENTER = 194; // visitInsn
264: int MONITOREXIT = 195; // -
265: //int WIDE = 196; // NOT VISITED
266: int MULTIANEWARRAY = 197; // visitMultiANewArrayInsn
267: int IFNULL = 198; // visitJumpInsn
268: int IFNONNULL = 199; // -
269: //int GOTO_W = 200; // -
270: //int JSR_W = 201; // -
271: }
|