DEADSOFTWARE

Patched for Linux
[mp3cc.git] / MPC.3.5.LINUX / classgen / bytecode.h
1 /********************************************************************
3 bytecode.h - methods for handling the bytecode
5 Niksa Orlic, 2004-05-22
7 ********************************************************************/
9 struct bytecode_struct
10 {
11 int bytecode_pos;
12 int bytecode_allocated_size;
13 char *bytecode;
14 };
16 typedef struct bytecode_struct bytecode;
18 bytecode *bytecode_create();
19 void bytecode_destroy(bytecode *code);
20 bytecode *bytecode_duplicate(bytecode*);
22 void bytecode_append(bytecode *code, char c);
23 void bytecode_append_short_int(bytecode *code, short int s);
24 void bytecode_append_long_int(bytecode *code, long int l);
25 void bytecode_append_bytecode(bytecode *dest, bytecode *src);
27 /* Java bytecode mnemonics defines */
28 enum Java_mnemonics
29 {
30 nop$ = 0x00,
31 aconst_null$,
32 iconst_m1$,
33 iconst_0$,
34 iconst_1$,
35 iconst_2$,
36 iconst_3$,
37 iconst_4$,
38 iconst_5$,
39 lconst_0$,
40 lconst_1$,
41 fconst_0$,
42 fconst_1$,
43 fconst_2$,
44 dconst_0$,
45 dconst_1$,
46 bipush$,
47 sipush$,
48 ldc$,
49 ldc_w$,
50 ldc2_w$,
51 iload$,
52 lload$,
53 fload$,
54 dload$,
55 aload$,
56 iload_0$,
57 iload_1$,
58 iload_2$,
59 iload_3$,
60 lload_0$,
61 lload_1$,
62 lload_2$,
63 lload_3$,
64 fload_0$,
65 fload_1$,
66 fload_2$,
67 fload_3$,
68 dload_0$,
69 dload_1$,
70 dload_2$,
71 dload_3$,
72 aload_0$,
73 aload_1$,
74 aload_2$,
75 aload_3$,
76 iaload$,
77 laload$,
78 faload$,
79 daload$,
80 aaload$,
81 baload$,
82 caload$,
83 saload$,
84 istore$,
85 lstore$,
86 fstore$,
87 dstore$,
88 astore$,
89 istore_0$,
90 istore_1$,
91 istore_2$,
92 istore_3$,
93 lstore_0$,
94 lstore_1$,
95 lstore_2$,
96 lstore_3$,
97 fstore_0$,
98 fstore_1$,
99 fstore_2$,
100 fstore_3$,
101 dstore_0$,
102 dstore_1$,
103 dstore_2$,
104 dstore_3$,
105 astore_0$,
106 astore_1$,
107 astore_2$,
108 astore_3$,
109 iastore$,
110 lastore$,
111 fastore$,
112 dastore$,
113 aastore$,
114 bastore$,
115 castore$,
116 sastore$,
117 pop$,
118 pop2$,
119 dup$,
120 dup_x1$,
121 dup_x2$,
122 dup2$,
123 dup2_x1$,
124 dup2_x2$,
125 swap$,
126 iadd$,
127 ladd$,
128 fadd$,
129 dadd$,
130 isub$,
131 lsub$,
132 fsub$,
133 dsub$,
134 imul$,
135 lmul$,
136 fmul$,
137 dmul$,
138 idiv$,
139 ldiv$,
140 fdiv$,
141 ddiv$,
142 irem$,
143 lrem$,
144 frem$,
145 drem$,
146 ineg$,
147 lneg$,
148 fneg$,
149 dneg$,
150 ishl$,
151 lshl$,
152 ishr$,
153 lshr$,
154 iushr$,
155 lushr$,
156 iand$,
157 land$,
158 ior$,
159 lor$,
160 ixor$,
161 lxor$,
162 iinc$,
163 i2l$,
164 i2f$,
165 i2d$,
166 l2i$,
167 l2f$,
168 l2d$,
169 f2i$,
170 f2l$,
171 f2d$,
172 d2i$,
173 d2l$,
174 d2f$,
175 i2b$,
176 i2c$,
177 i2s$,
178 lcmp$,
179 fcmpl$,
180 fcmpg$,
181 dcmpl$,
182 dcmpg$,
183 ifeq$,
184 ifne$,
185 iflt$,
186 ifge$,
187 ifgt$,
188 ifle$,
189 if_icmpeq$,
190 if_icmpne$,
191 if_icmplt$,
192 if_icmpge$,
193 if_icmpgt$,
194 if_icmple$,
195 if_acmpeq$,
196 if_acmpne$,
197 goto$,
198 jsr$,
199 ret$,
200 tableswitch$,
201 lookupswitch$,
202 ireturn$,
203 lreturn$,
204 freturn$,
205 dreturn$,
206 areturn$,
207 return$,
208 getstatic$,
209 putstatic$,
210 getfield$,
211 putfield$,
212 invokevirtual$,
213 invokespecial$,
214 invokestatic$,
215 invokeinterface$,
216 xxxunusedxxx1$,
217 new$,
218 newarray$,
219 anewarray$,
220 arraylength$,
221 athrow$,
222 checkcast$,
223 instanceof$,
224 monitorenter$,
225 monitorexit$,
226 wide$,
227 multianewarray$,
228 ifnull$,
229 ifnonnull$,
230 goto_w$,
231 jsr_w$,
233 break_stmt$ = 250 /* used internally by the parser to mark break statment positions */
234 };