Lines 31-1922
Link Here
|
31 |
import org.eclipse.jdt.internal.compiler.lookup.TypeIds; |
31 |
import org.eclipse.jdt.internal.compiler.lookup.TypeIds; |
32 |
|
32 |
|
33 |
public class StackMapFrameCodeStream extends CodeStream { |
33 |
public class StackMapFrameCodeStream extends CodeStream { |
34 |
public StackMapFrame currentFrame; |
34 |
public StackMapFrame currentFrame; |
35 |
public ArrayList frames; |
35 |
public ArrayList frames; |
|
|
36 |
|
37 |
public Set framePositions; |
38 |
|
39 |
public ArrayList variablesModificationsPositions; |
40 |
|
41 |
public int[] stateIndexes; |
42 |
public int stateIndexesCounter; |
36 |
|
43 |
|
37 |
public Set framePositions; |
|
|
38 |
|
39 |
public ArrayList variablesModificationsPositions; |
40 |
|
41 |
public int[] stateIndexes; |
42 |
public int stateIndexesCounter; |
43 |
|
44 |
public StackMapFrameCodeStream(ClassFile givenClassFile) { |
44 |
public StackMapFrameCodeStream(ClassFile givenClassFile) { |
45 |
super(givenClassFile); |
45 |
super(givenClassFile); |
46 |
} |
46 |
} |
47 |
public void aaload() { |
47 |
public void aaload() { |
48 |
super.aaload(); |
48 |
super.aaload(); |
49 |
this.currentFrame.numberOfStackItems--; |
49 |
if (this.currentFrame.numberOfStackItems >= 2) { |
50 |
this.currentFrame.replaceWithElementType(); |
50 |
this.currentFrame.numberOfStackItems--; |
|
|
51 |
this.currentFrame.replaceWithElementType(); |
52 |
} |
51 |
} |
53 |
} |
52 |
public void aastore() { |
54 |
public void aastore() { |
53 |
super.aastore(); |
55 |
super.aastore(); |
54 |
this.currentFrame.numberOfStackItems-=3; |
56 |
if (this.currentFrame.numberOfStackItems >= 3) { |
|
|
57 |
this.currentFrame.numberOfStackItems-=3; |
58 |
} |
55 |
} |
59 |
} |
56 |
public void aconst_null() { |
60 |
public void aconst_null() { |
57 |
super.aconst_null(); |
61 |
super.aconst_null(); |
58 |
this.currentFrame.addStackItem(TypeBinding.NULL); |
62 |
this.currentFrame.addStackItem(TypeBinding.NULL); |
59 |
} |
63 |
} |
60 |
public void addDefinitelyAssignedVariables(Scope scope, int initStateIndex) { |
64 |
public void addDefinitelyAssignedVariables(Scope scope, int initStateIndex) { |
61 |
// Required to fix 1PR0XVS: LFRE:WINNT - Compiler: variable table for method appears incorrect |
65 |
// Required to fix 1PR0XVS: LFRE:WINNT - Compiler: variable table for method appears incorrect |
62 |
loop: for (int i = 0; i < visibleLocalsCount; i++) { |
66 |
loop: for (int i = 0; i < visibleLocalsCount; i++) { |
63 |
LocalVariableBinding localBinding = visibleLocals[i]; |
67 |
LocalVariableBinding localBinding = visibleLocals[i]; |
64 |
if (localBinding != null) { |
68 |
if (localBinding != null) { |
65 |
// Check if the local is definitely assigned |
69 |
// Check if the local is definitely assigned |
66 |
boolean isDefinitelyAssigned = isDefinitelyAssigned(scope, initStateIndex, localBinding); |
70 |
boolean isDefinitelyAssigned = isDefinitelyAssigned(scope, initStateIndex, localBinding); |
67 |
if (!isDefinitelyAssigned) { |
71 |
if (!isDefinitelyAssigned) { |
68 |
if (this.stateIndexes != null) { |
72 |
if (this.stateIndexes != null) { |
69 |
for (int j = 0, max = this.stateIndexesCounter; j < max; j++) { |
73 |
for (int j = 0, max = this.stateIndexesCounter; j < max; j++) { |
70 |
if (isDefinitelyAssigned(scope, this.stateIndexes[j], localBinding)) { |
74 |
if (isDefinitelyAssigned(scope, this.stateIndexes[j], localBinding)) { |
71 |
currentFrame.putLocal(localBinding.resolvedPosition, new VerificationTypeInfo(localBinding.type)); |
75 |
currentFrame.putLocal(localBinding.resolvedPosition, new VerificationTypeInfo(localBinding.type)); |
72 |
if ((localBinding.initializationCount == 0) || (localBinding.initializationPCs[((localBinding.initializationCount - 1) << 1) + 1] != -1)) { |
76 |
if ((localBinding.initializationCount == 0) || (localBinding.initializationPCs[((localBinding.initializationCount - 1) << 1) + 1] != -1)) { |
73 |
/* There are two cases: |
77 |
/* There are two cases: |
74 |
* 1) there is no initialization interval opened ==> add an opened interval |
78 |
* 1) there is no initialization interval opened ==> add an opened interval |
75 |
* 2) there is already some initialization intervals but the last one is closed ==> add an opened interval |
79 |
* 2) there is already some initialization intervals but the last one is closed ==> add an opened interval |
76 |
* An opened interval means that the value at localBinding.initializationPCs[localBinding.initializationCount - 1][1] |
80 |
* An opened interval means that the value at localBinding.initializationPCs[localBinding.initializationCount - 1][1] |
77 |
* is equals to -1. |
81 |
* is equals to -1. |
78 |
* initializationPCs is a collection of pairs of int: |
82 |
* initializationPCs is a collection of pairs of int: |
79 |
* first value is the startPC and second value is the endPC. -1 one for the last value means that the interval |
83 |
* first value is the startPC and second value is the endPC. -1 one for the last value means that the interval |
80 |
* is not closed yet. |
84 |
* is not closed yet. |
81 |
*/ |
85 |
*/ |
82 |
localBinding.recordInitializationStartPC(position); |
86 |
localBinding.recordInitializationStartPC(position); |
83 |
} |
87 |
} |
84 |
continue loop; |
88 |
continue loop; |
85 |
} |
89 |
} |
86 |
} |
90 |
} |
87 |
} |
91 |
} |
88 |
} else { |
92 |
} else { |
89 |
currentFrame.putLocal(localBinding.resolvedPosition, new VerificationTypeInfo(localBinding.type)); |
93 |
currentFrame.putLocal(localBinding.resolvedPosition, new VerificationTypeInfo(localBinding.type)); |
90 |
if ((localBinding.initializationCount == 0) || (localBinding.initializationPCs[((localBinding.initializationCount - 1) << 1) + 1] != -1)) { |
94 |
if ((localBinding.initializationCount == 0) || (localBinding.initializationPCs[((localBinding.initializationCount - 1) << 1) + 1] != -1)) { |
91 |
/* There are two cases: |
95 |
/* There are two cases: |
92 |
* 1) there is no initialization interval opened ==> add an opened interval |
96 |
* 1) there is no initialization interval opened ==> add an opened interval |
93 |
* 2) there is already some initialization intervals but the last one is closed ==> add an opened interval |
97 |
* 2) there is already some initialization intervals but the last one is closed ==> add an opened interval |
94 |
* An opened interval means that the value at localBinding.initializationPCs[localBinding.initializationCount - 1][1] |
98 |
* An opened interval means that the value at localBinding.initializationPCs[localBinding.initializationCount - 1][1] |
95 |
* is equals to -1. |
99 |
* is equals to -1. |
96 |
* initializationPCs is a collection of pairs of int: |
100 |
* initializationPCs is a collection of pairs of int: |
97 |
* first value is the startPC and second value is the endPC. -1 one for the last value means that the interval |
101 |
* first value is the startPC and second value is the endPC. -1 one for the last value means that the interval |
98 |
* is not closed yet. |
102 |
* is not closed yet. |
99 |
*/ |
103 |
*/ |
100 |
localBinding.recordInitializationStartPC(position); |
104 |
localBinding.recordInitializationStartPC(position); |
101 |
} |
105 |
} |
102 |
} |
106 |
} |
103 |
} |
107 |
} |
104 |
} |
108 |
} |
105 |
Integer newValue = new Integer(this.position); |
109 |
Integer newValue = new Integer(this.position); |
106 |
if (this.variablesModificationsPositions.size() == 0 || !this.variablesModificationsPositions.get(this.variablesModificationsPositions.size() - 1).equals(newValue)) { |
110 |
if (this.variablesModificationsPositions.size() == 0 || !this.variablesModificationsPositions.get(this.variablesModificationsPositions.size() - 1).equals(newValue)) { |
107 |
this.variablesModificationsPositions.add(newValue); |
111 |
this.variablesModificationsPositions.add(newValue); |
108 |
} |
112 |
} |
109 |
storeStackMapFrame(); |
113 |
storeStackMapFrame(); |
110 |
} |
114 |
} |
111 |
public void addVariable(LocalVariableBinding localBinding) { |
115 |
public void addVariable(LocalVariableBinding localBinding) { |
112 |
currentFrame.putLocal(localBinding.resolvedPosition, new VerificationTypeInfo(localBinding.type)); |
116 |
currentFrame.putLocal(localBinding.resolvedPosition, new VerificationTypeInfo(localBinding.type)); |
113 |
storeStackMapFrame(); |
117 |
storeStackMapFrame(); |
114 |
super.addVariable(localBinding); |
118 |
super.addVariable(localBinding); |
115 |
} |
119 |
} |
116 |
public void aload(int iArg) { |
120 |
public void aload(int iArg) { |
117 |
super.aload(iArg); |
121 |
super.aload(iArg); |
118 |
this.currentFrame.addStackItem(getLocal(iArg, this.currentFrame)); |
122 |
this.currentFrame.addStackItem(getLocal(iArg, this.currentFrame)); |
119 |
} |
123 |
} |
120 |
public void aload_0() { |
124 |
public void aload_0() { |
121 |
super.aload_0(); |
125 |
super.aload_0(); |
122 |
this.currentFrame.addStackItem(getLocal(0, this.currentFrame)); |
126 |
this.currentFrame.addStackItem(getLocal(0, this.currentFrame)); |
123 |
} |
127 |
} |
124 |
public void aload_1() { |
128 |
public void aload_1() { |
125 |
super.aload_1(); |
129 |
super.aload_1(); |
126 |
this.currentFrame.addStackItem(getLocal(1, this.currentFrame)); |
130 |
this.currentFrame.addStackItem(getLocal(1, this.currentFrame)); |
127 |
} |
131 |
} |
128 |
|
132 |
|
129 |
public void aload_2() { |
133 |
public void aload_2() { |
130 |
super.aload_2(); |
134 |
super.aload_2(); |
131 |
this.currentFrame.addStackItem(getLocal(2, this.currentFrame)); |
135 |
this.currentFrame.addStackItem(getLocal(2, this.currentFrame)); |
132 |
} |
136 |
} |
133 |
public void aload_3() { |
137 |
public void aload_3() { |
134 |
super.aload_3(); |
138 |
super.aload_3(); |
135 |
this.currentFrame.addStackItem(getLocal(3, this.currentFrame)); |
139 |
this.currentFrame.addStackItem(getLocal(3, this.currentFrame)); |
136 |
} |
140 |
} |
137 |
public void anewarray(TypeBinding typeBinding) { |
141 |
public void anewarray(TypeBinding typeBinding) { |
138 |
super.anewarray(typeBinding); |
142 |
super.anewarray(typeBinding); |
139 |
char[] constantPoolName = typeBinding.constantPoolName(); |
143 |
char[] constantPoolName = typeBinding.constantPoolName(); |
140 |
int length = constantPoolName.length; |
144 |
int length = constantPoolName.length; |
141 |
System.arraycopy(constantPoolName, 0, (constantPoolName = new char[length + 3]), 2, length); |
145 |
System.arraycopy(constantPoolName, 0, (constantPoolName = new char[length + 3]), 2, length); |
142 |
constantPoolName[0] = '['; |
146 |
constantPoolName[0] = '['; |
143 |
constantPoolName[1] = 'L'; |
147 |
constantPoolName[1] = 'L'; |
144 |
constantPoolName[length + 2] = ';'; |
148 |
constantPoolName[length + 2] = ';'; |
145 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(typeBinding.id, constantPoolName); |
149 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
150 |
if (numberOfStackItems >= 1) { |
151 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(typeBinding.id, constantPoolName); |
152 |
} |
146 |
} |
153 |
} |
147 |
public void areturn() { |
154 |
public void areturn() { |
148 |
super.areturn(); |
155 |
super.areturn(); |
149 |
this.currentFrame.numberOfStackItems--; |
156 |
if (this.currentFrame.numberOfStackItems >= 1) { |
150 |
framePositions.add(new Integer(this.position)); |
157 |
this.currentFrame.numberOfStackItems--; |
|
|
158 |
} |
159 |
framePositions.add(new Integer(this.position)); |
151 |
} |
160 |
} |
152 |
public void arraylength() { |
161 |
public void arraylength() { |
153 |
super.arraylength(); |
162 |
super.arraylength(); |
154 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.INT); |
163 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
164 |
if (numberOfStackItems >= 1) { |
165 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.INT); |
166 |
} |
155 |
} |
167 |
} |
156 |
public void astore(int iArg) { |
168 |
public void astore(int iArg) { |
157 |
super.astore(iArg); |
169 |
super.astore(iArg); |
158 |
this.currentFrame.putLocal(iArg, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
170 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
159 |
this.currentFrame.numberOfStackItems--; |
171 |
if (numberOfStackItems >= 1) { |
|
|
172 |
this.currentFrame.putLocal(iArg, this.currentFrame.stackItems[numberOfStackItems - 1]); |
173 |
this.currentFrame.numberOfStackItems--; |
174 |
} |
160 |
} |
175 |
} |
161 |
public void astore_0() { |
176 |
public void astore_0() { |
162 |
super.astore_0(); |
177 |
super.astore_0(); |
163 |
this.currentFrame.putLocal(0, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
178 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
164 |
this.currentFrame.numberOfStackItems--; |
179 |
if (numberOfStackItems >= 1) { |
|
|
180 |
this.currentFrame.putLocal(0, this.currentFrame.stackItems[numberOfStackItems - 1]); |
181 |
this.currentFrame.numberOfStackItems--; |
182 |
} |
165 |
} |
183 |
} |
166 |
public void astore_1() { |
184 |
public void astore_1() { |
167 |
super.astore_1(); |
185 |
super.astore_1(); |
168 |
this.currentFrame.putLocal(1, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
186 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
169 |
this.currentFrame.numberOfStackItems--; |
187 |
if (numberOfStackItems >= 1) { |
|
|
188 |
this.currentFrame.putLocal(1, this.currentFrame.stackItems[numberOfStackItems - 1]); |
189 |
this.currentFrame.numberOfStackItems--; |
190 |
} |
170 |
} |
191 |
} |
171 |
public void astore_2() { |
192 |
public void astore_2() { |
172 |
super.astore_2(); |
193 |
super.astore_2(); |
173 |
this.currentFrame.putLocal(2, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
194 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
174 |
this.currentFrame.numberOfStackItems--; |
195 |
if (numberOfStackItems >= 1) { |
|
|
196 |
this.currentFrame.putLocal(2, this.currentFrame.stackItems[numberOfStackItems - 1]); |
197 |
this.currentFrame.numberOfStackItems--; |
198 |
} |
175 |
} |
199 |
} |
176 |
public void astore_3() { |
200 |
public void astore_3() { |
177 |
super.astore_3(); |
201 |
super.astore_3(); |
178 |
this.currentFrame.putLocal(3, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
202 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
179 |
this.currentFrame.numberOfStackItems--; |
203 |
if (numberOfStackItems >= 1) { |
|
|
204 |
this.currentFrame.putLocal(3, this.currentFrame.stackItems[numberOfStackItems - 1]); |
205 |
this.currentFrame.numberOfStackItems--; |
206 |
} |
180 |
} |
207 |
} |
181 |
public void athrow() { |
208 |
public void athrow() { |
182 |
super.athrow(); |
209 |
super.athrow(); |
183 |
this.currentFrame.numberOfStackItems--; |
210 |
if (this.currentFrame.numberOfStackItems >= 1) { |
184 |
framePositions.add(new Integer(this.position)); |
211 |
this.currentFrame.numberOfStackItems--; |
|
|
212 |
} |
213 |
framePositions.add(new Integer(this.position)); |
185 |
} |
214 |
} |
186 |
public void baload() { |
215 |
public void baload() { |
187 |
super.baload(); |
216 |
super.baload(); |
188 |
this.currentFrame.numberOfStackItems--; |
217 |
if (this.currentFrame.numberOfStackItems >= 2) { |
189 |
this.currentFrame.replaceWithElementType(); |
218 |
this.currentFrame.numberOfStackItems--; |
|
|
219 |
this.currentFrame.replaceWithElementType(); |
220 |
} |
190 |
} |
221 |
} |
191 |
public void bastore() { |
222 |
public void bastore() { |
192 |
super.bastore(); |
223 |
super.bastore(); |
193 |
this.currentFrame.numberOfStackItems-=3; |
224 |
if (this.currentFrame.numberOfStackItems >= 3) { |
|
|
225 |
this.currentFrame.numberOfStackItems-=3; |
226 |
} |
194 |
} |
227 |
} |
195 |
public void bipush(byte b) { |
228 |
public void bipush(byte b) { |
196 |
super.bipush(b); |
229 |
super.bipush(b); |
197 |
this.currentFrame.addStackItem(TypeBinding.INT); |
230 |
this.currentFrame.addStackItem(TypeBinding.INT); |
198 |
} |
231 |
} |
199 |
public void caload() { |
232 |
public void caload() { |
200 |
super.caload(); |
233 |
super.caload(); |
201 |
this.currentFrame.numberOfStackItems--; |
234 |
if (this.currentFrame.numberOfStackItems >= 2) { |
202 |
this.currentFrame.replaceWithElementType(); |
235 |
this.currentFrame.numberOfStackItems--; |
|
|
236 |
this.currentFrame.replaceWithElementType(); |
237 |
} |
203 |
} |
238 |
} |
204 |
public void castore() { |
239 |
public void castore() { |
205 |
super.castore(); |
240 |
super.castore(); |
206 |
this.currentFrame.numberOfStackItems-=3; |
241 |
if (this.currentFrame.numberOfStackItems >= 3) { |
|
|
242 |
this.currentFrame.numberOfStackItems-=3; |
243 |
} |
207 |
} |
244 |
} |
208 |
public void checkcast(int baseId) { |
245 |
public void checkcast(int baseId) { |
209 |
super.checkcast(baseId); |
246 |
super.checkcast(baseId); |
210 |
VerificationTypeInfo info = null; |
247 |
VerificationTypeInfo info = null; |
211 |
switch (baseId) { |
248 |
switch (baseId) { |
212 |
case TypeIds.T_byte : |
249 |
case TypeIds.T_byte : |
213 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangByte, ConstantPool.JavaLangByteConstantPoolName); |
250 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangByte, ConstantPool.JavaLangByteConstantPoolName); |
214 |
break; |
251 |
break; |
215 |
case TypeIds.T_short : |
252 |
case TypeIds.T_short : |
216 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangShort, ConstantPool.JavaLangShortConstantPoolName); |
253 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangShort, ConstantPool.JavaLangShortConstantPoolName); |
217 |
break; |
254 |
break; |
218 |
case TypeIds.T_char : |
255 |
case TypeIds.T_char : |
219 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangCharacter, ConstantPool.JavaLangCharacterConstantPoolName); |
256 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangCharacter, ConstantPool.JavaLangCharacterConstantPoolName); |
220 |
break; |
257 |
break; |
221 |
case TypeIds.T_int : |
258 |
case TypeIds.T_int : |
222 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangInteger, ConstantPool.JavaLangIntegerConstantPoolName); |
259 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangInteger, ConstantPool.JavaLangIntegerConstantPoolName); |
223 |
break; |
260 |
break; |
224 |
case TypeIds.T_long : |
261 |
case TypeIds.T_long : |
225 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangLong, ConstantPool.JavaLangLongConstantPoolName); |
262 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangLong, ConstantPool.JavaLangLongConstantPoolName); |
226 |
break; |
263 |
break; |
227 |
case TypeIds.T_float : |
264 |
case TypeIds.T_float : |
228 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangFloat, ConstantPool.JavaLangFloatConstantPoolName); |
265 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangFloat, ConstantPool.JavaLangFloatConstantPoolName); |
229 |
break; |
266 |
break; |
230 |
case TypeIds.T_double : |
267 |
case TypeIds.T_double : |
231 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangDouble, ConstantPool.JavaLangDoubleConstantPoolName); |
268 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangDouble, ConstantPool.JavaLangDoubleConstantPoolName); |
232 |
break; |
269 |
break; |
233 |
case TypeIds.T_boolean : |
270 |
case TypeIds.T_boolean : |
234 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangBoolean, ConstantPool.JavaLangBooleanConstantPoolName); |
271 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangBoolean, ConstantPool.JavaLangBooleanConstantPoolName); |
235 |
} |
272 |
} |
236 |
if (info != null) { |
273 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
237 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = info; |
274 |
if (info != null && (numberOfStackItems >= 1)) { |
238 |
} |
275 |
this.currentFrame.stackItems[numberOfStackItems - 1] = info; |
|
|
276 |
} |
239 |
} |
277 |
} |
240 |
public void checkcast(TypeBinding typeBinding) { |
278 |
public void checkcast(TypeBinding typeBinding) { |
241 |
super.checkcast(typeBinding); |
279 |
super.checkcast(typeBinding); |
242 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(typeBinding); |
280 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
281 |
if (numberOfStackItems >= 1) { |
282 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(typeBinding); |
283 |
} |
243 |
} |
284 |
} |
244 |
public void d2f() { |
285 |
public void d2f() { |
245 |
super.d2f(); |
286 |
super.d2f(); |
246 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.FLOAT); |
287 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
288 |
if (numberOfStackItems >= 1) { |
289 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.FLOAT); |
290 |
} |
247 |
} |
291 |
} |
248 |
public void d2i() { |
292 |
public void d2i() { |
249 |
super.d2i(); |
293 |
super.d2i(); |
250 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.INT); |
294 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
295 |
if (numberOfStackItems >= 1) { |
296 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.INT); |
297 |
} |
251 |
} |
298 |
} |
252 |
public void d2l() { |
299 |
public void d2l() { |
253 |
super.d2l(); |
300 |
super.d2l(); |
254 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.LONG); |
301 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
302 |
if (numberOfStackItems >= 1) { |
303 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.LONG); |
304 |
} |
255 |
} |
305 |
} |
256 |
public void dadd() { |
306 |
public void dadd() { |
257 |
super.dadd(); |
307 |
super.dadd(); |
258 |
this.currentFrame.numberOfStackItems--; |
308 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
309 |
this.currentFrame.numberOfStackItems--; |
310 |
} |
259 |
} |
311 |
} |
260 |
public void daload() { |
312 |
public void daload() { |
261 |
super.daload(); |
313 |
super.daload(); |
262 |
this.currentFrame.numberOfStackItems--; |
314 |
if (this.currentFrame.numberOfStackItems >= 2) { |
263 |
this.currentFrame.replaceWithElementType(); |
315 |
this.currentFrame.numberOfStackItems--; |
|
|
316 |
this.currentFrame.replaceWithElementType(); |
317 |
} |
264 |
} |
318 |
} |
265 |
public void dastore() { |
319 |
public void dastore() { |
266 |
super.dastore(); |
320 |
super.dastore(); |
267 |
this.currentFrame.numberOfStackItems-=3; |
321 |
if (this.currentFrame.numberOfStackItems >= 3) { |
|
|
322 |
this.currentFrame.numberOfStackItems-=3; |
323 |
} |
268 |
} |
324 |
} |
269 |
public void dcmpg() { |
325 |
public void dcmpg() { |
270 |
super.dcmpg(); |
326 |
super.dcmpg(); |
271 |
this.currentFrame.numberOfStackItems-=2; |
327 |
if (this.currentFrame.numberOfStackItems >= 2) { |
272 |
this.currentFrame.addStackItem(TypeBinding.INT); |
328 |
this.currentFrame.numberOfStackItems-=2; |
|
|
329 |
this.currentFrame.addStackItem(TypeBinding.INT); |
330 |
} |
273 |
} |
331 |
} |
274 |
public void dcmpl() { |
332 |
public void dcmpl() { |
275 |
super.dcmpl(); |
333 |
super.dcmpl(); |
276 |
this.currentFrame.numberOfStackItems-=2; |
334 |
if (this.currentFrame.numberOfStackItems >= 2) { |
277 |
this.currentFrame.addStackItem(TypeBinding.INT); |
335 |
this.currentFrame.numberOfStackItems-=2; |
|
|
336 |
this.currentFrame.addStackItem(TypeBinding.INT); |
337 |
} |
278 |
} |
338 |
} |
279 |
public void dconst_0() { |
339 |
public void dconst_0() { |
280 |
super.dconst_0(); |
340 |
super.dconst_0(); |
281 |
this.currentFrame.addStackItem(TypeBinding.DOUBLE); |
341 |
this.currentFrame.addStackItem(TypeBinding.DOUBLE); |
282 |
} |
342 |
} |
283 |
public void dconst_1() { |
343 |
public void dconst_1() { |
284 |
super.dconst_1(); |
344 |
super.dconst_1(); |
285 |
this.currentFrame.addStackItem(TypeBinding.DOUBLE); |
345 |
this.currentFrame.addStackItem(TypeBinding.DOUBLE); |
286 |
} |
346 |
} |
287 |
public void ddiv() { |
347 |
public void ddiv() { |
288 |
super.ddiv(); |
348 |
super.ddiv(); |
289 |
this.currentFrame.numberOfStackItems--; |
349 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
350 |
this.currentFrame.numberOfStackItems--; |
351 |
} |
290 |
} |
352 |
} |
291 |
public void decrStackSize(int offset) { |
353 |
public void decrStackSize(int offset) { |
292 |
super.decrStackSize(offset); |
354 |
super.decrStackSize(offset); |
293 |
this.currentFrame.numberOfStackItems --; |
355 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
356 |
this.currentFrame.numberOfStackItems --; |
357 |
} |
294 |
} |
358 |
} |
295 |
public void dload(int iArg) { |
359 |
public void dload(int iArg) { |
296 |
super.dload(iArg); |
360 |
super.dload(iArg); |
297 |
this.currentFrame.addStackItem(getLocal(iArg, this.currentFrame)); |
361 |
this.currentFrame.addStackItem(getLocal(iArg, this.currentFrame)); |
298 |
} |
362 |
} |
299 |
public void dload_0() { |
363 |
public void dload_0() { |
300 |
super.dload_0(); |
364 |
super.dload_0(); |
301 |
this.currentFrame.addStackItem(getLocal(0, this.currentFrame)); |
365 |
this.currentFrame.addStackItem(getLocal(0, this.currentFrame)); |
302 |
} |
366 |
} |
303 |
public void dload_1() { |
367 |
public void dload_1() { |
304 |
super.dload_1(); |
368 |
super.dload_1(); |
305 |
this.currentFrame.addStackItem(getLocal(1, this.currentFrame)); |
369 |
this.currentFrame.addStackItem(getLocal(1, this.currentFrame)); |
306 |
} |
370 |
} |
307 |
public void dload_2() { |
371 |
public void dload_2() { |
308 |
super.dload_2(); |
372 |
super.dload_2(); |
309 |
this.currentFrame.addStackItem(getLocal(2, this.currentFrame)); |
373 |
this.currentFrame.addStackItem(getLocal(2, this.currentFrame)); |
310 |
} |
374 |
} |
311 |
public void dload_3() { |
375 |
public void dload_3() { |
312 |
super.dload_3(); |
376 |
super.dload_3(); |
313 |
this.currentFrame.addStackItem(getLocal(3, this.currentFrame)); |
377 |
this.currentFrame.addStackItem(getLocal(3, this.currentFrame)); |
314 |
} |
378 |
} |
315 |
public void dmul() { |
379 |
public void dmul() { |
316 |
super.dmul(); |
380 |
super.dmul(); |
317 |
this.currentFrame.numberOfStackItems--; |
381 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
382 |
this.currentFrame.numberOfStackItems--; |
383 |
} |
318 |
} |
384 |
} |
319 |
public void drem() { |
385 |
public void drem() { |
320 |
super.drem(); |
386 |
super.drem(); |
321 |
this.currentFrame.numberOfStackItems--; |
387 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
388 |
this.currentFrame.numberOfStackItems--; |
389 |
} |
322 |
} |
390 |
} |
323 |
public void dreturn() { |
391 |
public void dreturn() { |
324 |
super.dreturn(); |
392 |
super.dreturn(); |
325 |
this.currentFrame.numberOfStackItems--; |
393 |
if (this.currentFrame.numberOfStackItems >= 1) { |
326 |
this.framePositions.add(new Integer(this.position)); |
394 |
this.currentFrame.numberOfStackItems--; |
|
|
395 |
} |
396 |
this.framePositions.add(new Integer(this.position)); |
327 |
} |
397 |
} |
328 |
public void dstore(int iArg) { |
398 |
public void dstore(int iArg) { |
329 |
super.dstore(iArg); |
399 |
super.dstore(iArg); |
330 |
this.currentFrame.putLocal(iArg, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
400 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
331 |
this.currentFrame.numberOfStackItems--; |
401 |
if (numberOfStackItems >= 1) { |
|
|
402 |
this.currentFrame.putLocal(iArg, this.currentFrame.stackItems[numberOfStackItems - 1]); |
403 |
this.currentFrame.numberOfStackItems--; |
404 |
} |
332 |
} |
405 |
} |
333 |
public void dstore_0() { |
406 |
public void dstore_0() { |
334 |
super.dstore_0(); |
407 |
super.dstore_0(); |
335 |
this.currentFrame.putLocal(0, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
408 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
336 |
this.currentFrame.numberOfStackItems--; |
409 |
if (numberOfStackItems >= 1) { |
|
|
410 |
this.currentFrame.putLocal(0, this.currentFrame.stackItems[numberOfStackItems - 1]); |
411 |
this.currentFrame.numberOfStackItems--; |
412 |
} |
337 |
} |
413 |
} |
338 |
public void dstore_1() { |
414 |
public void dstore_1() { |
339 |
super.dstore_1(); |
415 |
super.dstore_1(); |
340 |
this.currentFrame.putLocal(1, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
416 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
341 |
this.currentFrame.numberOfStackItems--; |
417 |
if (numberOfStackItems >= 1) { |
|
|
418 |
this.currentFrame.putLocal(1, this.currentFrame.stackItems[numberOfStackItems - 1]); |
419 |
this.currentFrame.numberOfStackItems--; |
420 |
} |
342 |
} |
421 |
} |
343 |
public void dstore_2() { |
422 |
public void dstore_2() { |
344 |
super.dstore_2(); |
423 |
super.dstore_2(); |
345 |
this.currentFrame.putLocal(2, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
424 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
346 |
this.currentFrame.numberOfStackItems--; |
425 |
if (numberOfStackItems >= 1) { |
|
|
426 |
this.currentFrame.putLocal(2, this.currentFrame.stackItems[numberOfStackItems - 1]); |
427 |
this.currentFrame.numberOfStackItems--; |
428 |
} |
347 |
} |
429 |
} |
348 |
public void dstore_3() { |
430 |
public void dstore_3() { |
349 |
super.dstore_3(); |
431 |
super.dstore_3(); |
350 |
this.currentFrame.putLocal(3, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
432 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
351 |
this.currentFrame.numberOfStackItems--; |
433 |
if (numberOfStackItems >= 1) { |
|
|
434 |
this.currentFrame.putLocal(3, this.currentFrame.stackItems[numberOfStackItems - 1]); |
435 |
this.currentFrame.numberOfStackItems--; |
436 |
} |
352 |
} |
437 |
} |
353 |
public void dsub() { |
438 |
public void dsub() { |
354 |
super.dsub(); |
439 |
super.dsub(); |
355 |
this.currentFrame.numberOfStackItems--; |
440 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
441 |
this.currentFrame.numberOfStackItems--; |
442 |
} |
356 |
} |
443 |
} |
357 |
public void dup() { |
444 |
public void dup() { |
358 |
super.dup(); |
445 |
super.dup(); |
359 |
this.currentFrame.addStackItem(this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
446 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
447 |
if (numberOfStackItems >= 1) { |
448 |
this.currentFrame.addStackItem(this.currentFrame.stackItems[numberOfStackItems - 1]); |
449 |
} |
360 |
} |
450 |
} |
361 |
public void dup_x1() { |
451 |
public void dup_x1() { |
362 |
super.dup_x1(); |
452 |
super.dup_x1(); |
363 |
VerificationTypeInfo info = this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]; |
453 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
364 |
this.currentFrame.numberOfStackItems--; |
454 |
if (numberOfStackItems >= 2) { |
365 |
VerificationTypeInfo info2 = this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]; |
455 |
VerificationTypeInfo info = this.currentFrame.stackItems[numberOfStackItems - 1]; |
366 |
this.currentFrame.numberOfStackItems--; |
456 |
this.currentFrame.numberOfStackItems--; |
367 |
this.currentFrame.addStackItem(info); |
457 |
VerificationTypeInfo info2 = this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]; |
368 |
this.currentFrame.addStackItem(info2); |
458 |
this.currentFrame.numberOfStackItems--; |
369 |
this.currentFrame.addStackItem(info); |
459 |
this.currentFrame.addStackItem(info); |
|
|
460 |
this.currentFrame.addStackItem(info2); |
461 |
this.currentFrame.addStackItem(info); |
462 |
} |
370 |
} |
463 |
} |
371 |
public void dup_x2() { |
464 |
public void dup_x2() { |
372 |
super.dup_x2(); |
465 |
super.dup_x2(); |
373 |
VerificationTypeInfo info = this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]; |
466 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
374 |
this.currentFrame.numberOfStackItems--; |
467 |
if (numberOfStackItems >= 2) { |
375 |
VerificationTypeInfo info2 = this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]; |
468 |
VerificationTypeInfo info = this.currentFrame.stackItems[numberOfStackItems - 1]; |
376 |
this.currentFrame.numberOfStackItems--; |
469 |
this.currentFrame.numberOfStackItems--; |
377 |
switch(info2.id()) { |
470 |
VerificationTypeInfo info2 = this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]; |
378 |
case TypeIds.T_long : |
471 |
this.currentFrame.numberOfStackItems--; |
379 |
case TypeIds.T_double : |
472 |
switch(info2.id()) { |
380 |
this.currentFrame.addStackItem(info); |
473 |
case TypeIds.T_long : |
381 |
this.currentFrame.addStackItem(info2); |
474 |
case TypeIds.T_double : |
382 |
this.currentFrame.addStackItem(info); |
475 |
this.currentFrame.addStackItem(info); |
383 |
break; |
476 |
this.currentFrame.addStackItem(info2); |
384 |
default: |
477 |
this.currentFrame.addStackItem(info); |
385 |
VerificationTypeInfo info3 = this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]; |
478 |
break; |
386 |
this.currentFrame.numberOfStackItems--; |
479 |
default: |
387 |
this.currentFrame.addStackItem(info); |
480 |
numberOfStackItems = this.currentFrame.numberOfStackItems; |
388 |
this.currentFrame.addStackItem(info3); |
481 |
if (numberOfStackItems >= 1) { |
389 |
this.currentFrame.addStackItem(info2); |
482 |
VerificationTypeInfo info3 = this.currentFrame.stackItems[numberOfStackItems - 1]; |
390 |
this.currentFrame.addStackItem(info); |
483 |
this.currentFrame.numberOfStackItems--; |
391 |
} |
484 |
this.currentFrame.addStackItem(info); |
|
|
485 |
this.currentFrame.addStackItem(info3); |
486 |
this.currentFrame.addStackItem(info2); |
487 |
this.currentFrame.addStackItem(info); |
488 |
} |
489 |
} |
490 |
} |
392 |
} |
491 |
} |
393 |
public void dup2() { |
492 |
public void dup2() { |
394 |
super.dup2(); |
493 |
super.dup2(); |
395 |
VerificationTypeInfo info = this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]; |
494 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
396 |
this.currentFrame.numberOfStackItems--; |
495 |
if (numberOfStackItems >= 1) { |
397 |
switch(info.id()) { |
496 |
VerificationTypeInfo info = this.currentFrame.stackItems[numberOfStackItems - 1]; |
398 |
case TypeIds.T_double : |
497 |
this.currentFrame.numberOfStackItems--; |
399 |
case TypeIds.T_long : |
498 |
switch(info.id()) { |
400 |
this.currentFrame.addStackItem(info); |
499 |
case TypeIds.T_double : |
401 |
this.currentFrame.addStackItem(info); |
500 |
case TypeIds.T_long : |
402 |
break; |
501 |
this.currentFrame.addStackItem(info); |
403 |
default: |
502 |
this.currentFrame.addStackItem(info); |
404 |
VerificationTypeInfo info2 = this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]; |
503 |
break; |
405 |
this.currentFrame.numberOfStackItems--; |
504 |
default: |
406 |
this.currentFrame.addStackItem(info2); |
505 |
numberOfStackItems = this.currentFrame.numberOfStackItems; |
407 |
this.currentFrame.addStackItem(info); |
506 |
if (numberOfStackItems >= 1) { |
408 |
this.currentFrame.addStackItem(info2); |
507 |
VerificationTypeInfo info2 = this.currentFrame.stackItems[numberOfStackItems - 1]; |
409 |
this.currentFrame.addStackItem(info); |
508 |
this.currentFrame.numberOfStackItems--; |
410 |
} |
509 |
this.currentFrame.addStackItem(info2); |
|
|
510 |
this.currentFrame.addStackItem(info); |
511 |
this.currentFrame.addStackItem(info2); |
512 |
this.currentFrame.addStackItem(info); |
513 |
} |
514 |
} |
515 |
} |
411 |
} |
516 |
} |
412 |
public void dup2_x1() { |
517 |
public void dup2_x1() { |
413 |
super.dup2_x1(); |
518 |
super.dup2_x1(); |
414 |
VerificationTypeInfo info = this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]; |
519 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
415 |
this.currentFrame.numberOfStackItems--; |
520 |
if (numberOfStackItems >= 2) { |
416 |
VerificationTypeInfo info2 = this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]; |
521 |
VerificationTypeInfo info = this.currentFrame.stackItems[numberOfStackItems - 1]; |
417 |
this.currentFrame.numberOfStackItems--; |
522 |
this.currentFrame.numberOfStackItems--; |
418 |
switch(info.id()) { |
523 |
VerificationTypeInfo info2 = this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]; |
419 |
case TypeIds.T_double : |
524 |
this.currentFrame.numberOfStackItems--; |
420 |
case TypeIds.T_long : |
525 |
switch(info.id()) { |
421 |
this.currentFrame.addStackItem(info); |
526 |
case TypeIds.T_double : |
422 |
this.currentFrame.addStackItem(info2); |
527 |
case TypeIds.T_long : |
423 |
this.currentFrame.addStackItem(info); |
528 |
this.currentFrame.addStackItem(info); |
424 |
break; |
529 |
this.currentFrame.addStackItem(info2); |
425 |
default: |
530 |
this.currentFrame.addStackItem(info); |
426 |
VerificationTypeInfo info3 = this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]; |
531 |
break; |
427 |
this.currentFrame.numberOfStackItems--; |
532 |
default: |
428 |
this.currentFrame.addStackItem(info2); |
533 |
numberOfStackItems = this.currentFrame.numberOfStackItems; |
429 |
this.currentFrame.addStackItem(info); |
534 |
if (numberOfStackItems >= 1) { |
430 |
this.currentFrame.addStackItem(info3); |
535 |
VerificationTypeInfo info3 = this.currentFrame.stackItems[numberOfStackItems - 1]; |
431 |
this.currentFrame.addStackItem(info2); |
536 |
this.currentFrame.numberOfStackItems--; |
432 |
this.currentFrame.addStackItem(info); |
537 |
this.currentFrame.addStackItem(info2); |
433 |
} |
538 |
this.currentFrame.addStackItem(info); |
|
|
539 |
this.currentFrame.addStackItem(info3); |
540 |
this.currentFrame.addStackItem(info2); |
541 |
this.currentFrame.addStackItem(info); |
542 |
} |
543 |
} |
544 |
} |
434 |
} |
545 |
} |
435 |
public void dup2_x2() { |
546 |
public void dup2_x2() { |
436 |
super.dup2_x2(); |
547 |
super.dup2_x2(); |
437 |
VerificationTypeInfo info = this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]; |
548 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
438 |
this.currentFrame.numberOfStackItems--; |
549 |
if (numberOfStackItems >= 2) { |
439 |
VerificationTypeInfo info2 = this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]; |
550 |
VerificationTypeInfo info = this.currentFrame.stackItems[numberOfStackItems - 1]; |
440 |
this.currentFrame.numberOfStackItems--; |
551 |
this.currentFrame.numberOfStackItems--; |
441 |
switch(info.id()) { |
552 |
VerificationTypeInfo info2 = this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]; |
442 |
case TypeIds.T_long : |
553 |
this.currentFrame.numberOfStackItems--; |
443 |
case TypeIds.T_double : |
554 |
switch(info.id()) { |
444 |
switch(info2.id()) { |
555 |
case TypeIds.T_long : |
445 |
case TypeIds.T_long : |
556 |
case TypeIds.T_double : |
446 |
case TypeIds.T_double : |
557 |
switch(info2.id()) { |
447 |
// form 4 |
558 |
case TypeIds.T_long : |
448 |
this.currentFrame.addStackItem(info); |
559 |
case TypeIds.T_double : |
449 |
this.currentFrame.addStackItem(info2); |
560 |
// form 4 |
450 |
this.currentFrame.addStackItem(info); |
561 |
this.currentFrame.addStackItem(info); |
451 |
break; |
562 |
this.currentFrame.addStackItem(info2); |
452 |
default: |
563 |
this.currentFrame.addStackItem(info); |
453 |
// form 2 |
564 |
break; |
454 |
VerificationTypeInfo info3 = this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]; |
565 |
default: |
455 |
this.currentFrame.numberOfStackItems--; |
566 |
// form 2 |
456 |
this.currentFrame.addStackItem(info); |
567 |
numberOfStackItems = this.currentFrame.numberOfStackItems; |
457 |
this.currentFrame.addStackItem(info3); |
568 |
if (numberOfStackItems >= 1) { |
458 |
this.currentFrame.addStackItem(info2); |
569 |
VerificationTypeInfo info3 = this.currentFrame.stackItems[numberOfStackItems - 1]; |
459 |
this.currentFrame.addStackItem(info); |
570 |
this.currentFrame.numberOfStackItems--; |
460 |
} |
571 |
this.currentFrame.addStackItem(info); |
461 |
break; |
572 |
this.currentFrame.addStackItem(info3); |
462 |
default: |
573 |
this.currentFrame.addStackItem(info2); |
463 |
VerificationTypeInfo info3 = this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]; |
574 |
this.currentFrame.addStackItem(info); |
464 |
this.currentFrame.numberOfStackItems--; |
575 |
} |
465 |
switch(info3.id()) { |
576 |
} |
466 |
case TypeIds.T_long : |
577 |
break; |
467 |
case TypeIds.T_double : |
578 |
default: |
468 |
// form 3 |
579 |
numberOfStackItems = this.currentFrame.numberOfStackItems; |
469 |
this.currentFrame.addStackItem(info2); |
580 |
if (numberOfStackItems >= 1) { |
470 |
this.currentFrame.addStackItem(info); |
581 |
VerificationTypeInfo info3 = this.currentFrame.stackItems[numberOfStackItems - 1]; |
471 |
this.currentFrame.addStackItem(info3); |
582 |
this.currentFrame.numberOfStackItems--; |
472 |
this.currentFrame.addStackItem(info2); |
583 |
switch(info3.id()) { |
473 |
this.currentFrame.addStackItem(info); |
584 |
case TypeIds.T_long : |
474 |
break; |
585 |
case TypeIds.T_double : |
475 |
default: |
586 |
// form 3 |
476 |
// form 1 |
587 |
this.currentFrame.addStackItem(info2); |
477 |
VerificationTypeInfo info4 = this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]; |
588 |
this.currentFrame.addStackItem(info); |
478 |
this.currentFrame.numberOfStackItems--; |
589 |
this.currentFrame.addStackItem(info3); |
479 |
this.currentFrame.addStackItem(info2); |
590 |
this.currentFrame.addStackItem(info2); |
480 |
this.currentFrame.addStackItem(info); |
591 |
this.currentFrame.addStackItem(info); |
481 |
this.currentFrame.addStackItem(info4); |
592 |
break; |
482 |
this.currentFrame.addStackItem(info3); |
593 |
default: |
483 |
this.currentFrame.addStackItem(info2); |
594 |
// form 1 |
484 |
this.currentFrame.addStackItem(info); |
595 |
numberOfStackItems = this.currentFrame.numberOfStackItems; |
485 |
} |
596 |
if (numberOfStackItems >= 1) { |
486 |
} |
597 |
VerificationTypeInfo info4 = this.currentFrame.stackItems[numberOfStackItems - 1]; |
|
|
598 |
this.currentFrame.numberOfStackItems--; |
599 |
this.currentFrame.addStackItem(info2); |
600 |
this.currentFrame.addStackItem(info); |
601 |
this.currentFrame.addStackItem(info4); |
602 |
this.currentFrame.addStackItem(info3); |
603 |
this.currentFrame.addStackItem(info2); |
604 |
this.currentFrame.addStackItem(info); |
605 |
} |
606 |
} |
607 |
} |
608 |
} |
609 |
} |
487 |
} |
610 |
} |
488 |
public void exitUserScope(BlockScope currentScope) { |
611 |
public void exitUserScope(BlockScope currentScope) { |
489 |
int index = this.visibleLocalsCount - 1; |
612 |
int index = this.visibleLocalsCount - 1; |
490 |
while (index >= 0) { |
613 |
while (index >= 0) { |
491 |
LocalVariableBinding visibleLocal = visibleLocals[index]; |
614 |
LocalVariableBinding visibleLocal = visibleLocals[index]; |
492 |
if (visibleLocal == null) { |
615 |
if (visibleLocal == null) { |
493 |
index--; |
616 |
index--; |
494 |
continue; |
617 |
continue; |
495 |
} |
618 |
} |
496 |
if (visibleLocal.declaringScope != currentScope) // left currentScope |
619 |
if (visibleLocal.declaringScope != currentScope) // left currentScope |
497 |
break; |
620 |
break; |
498 |
|
621 |
|
499 |
// there may be some preserved locals never initialized |
622 |
// there may be some preserved locals never initialized |
500 |
if (visibleLocal.initializationCount > 0){ |
623 |
if (visibleLocal.initializationCount > 0){ |
501 |
this.currentFrame.removeLocals(visibleLocal.resolvedPosition); |
624 |
this.currentFrame.removeLocals(visibleLocal.resolvedPosition); |
502 |
} |
625 |
} |
503 |
index--; |
626 |
index--; |
504 |
} |
627 |
} |
505 |
if (currentScope != null) { |
628 |
if (currentScope != null) { |
506 |
int localIndex = currentScope.localIndex; |
629 |
int localIndex = currentScope.localIndex; |
507 |
if (localIndex != 0) { |
630 |
if (localIndex != 0) { |
508 |
for (int i = 0; i < localIndex; i++) { |
631 |
for (int i = 0; i < localIndex; i++) { |
509 |
LocalVariableBinding variableBinding = currentScope.locals[i]; |
632 |
LocalVariableBinding variableBinding = currentScope.locals[i]; |
510 |
if (variableBinding != null && variableBinding.useFlag == LocalVariableBinding.USED && variableBinding.resolvedPosition != -1) { |
633 |
if (variableBinding != null && variableBinding.useFlag == LocalVariableBinding.USED && variableBinding.resolvedPosition != -1) { |
511 |
this.currentFrame.removeLocals(variableBinding.resolvedPosition); |
634 |
this.currentFrame.removeLocals(variableBinding.resolvedPosition); |
512 |
} |
635 |
} |
513 |
} |
636 |
} |
514 |
} |
637 |
} |
515 |
} |
638 |
} |
516 |
super.exitUserScope(currentScope); |
639 |
super.exitUserScope(currentScope); |
517 |
} |
640 |
} |
518 |
public void exitUserScope(BlockScope currentScope, LocalVariableBinding binding) { |
641 |
public void exitUserScope(BlockScope currentScope, LocalVariableBinding binding) { |
519 |
int index = this.visibleLocalsCount - 1; |
642 |
int index = this.visibleLocalsCount - 1; |
520 |
while (index >= 0) { |
643 |
while (index >= 0) { |
521 |
LocalVariableBinding visibleLocal = visibleLocals[index]; |
644 |
LocalVariableBinding visibleLocal = visibleLocals[index]; |
522 |
if (visibleLocal == null || visibleLocal == binding) { |
645 |
if (visibleLocal == null || visibleLocal == binding) { |
523 |
index--; |
646 |
index--; |
524 |
continue; |
647 |
continue; |
525 |
} |
648 |
} |
526 |
if (visibleLocal.declaringScope != currentScope) // left currentScope |
649 |
if (visibleLocal.declaringScope != currentScope) // left currentScope |
527 |
break; |
650 |
break; |
528 |
|
651 |
|
529 |
// there may be some preserved locals never initialized |
652 |
// there may be some preserved locals never initialized |
530 |
if (visibleLocal.initializationCount > 0){ |
653 |
if (visibleLocal.initializationCount > 0){ |
531 |
this.currentFrame.removeLocals(visibleLocal.resolvedPosition); |
654 |
this.currentFrame.removeLocals(visibleLocal.resolvedPosition); |
532 |
} |
655 |
} |
533 |
index--; |
656 |
index--; |
534 |
} |
657 |
} |
535 |
if (currentScope != null) { |
658 |
if (currentScope != null) { |
536 |
int localIndex = currentScope.localIndex; |
659 |
int localIndex = currentScope.localIndex; |
537 |
if (localIndex != 0) { |
660 |
if (localIndex != 0) { |
538 |
for (int i = 0; i < localIndex; i++) { |
661 |
for (int i = 0; i < localIndex; i++) { |
539 |
LocalVariableBinding variableBinding = currentScope.locals[i]; |
662 |
LocalVariableBinding variableBinding = currentScope.locals[i]; |
540 |
if (variableBinding != null && variableBinding != binding && variableBinding.useFlag == LocalVariableBinding.USED && variableBinding.resolvedPosition != -1) { |
663 |
if (variableBinding != null && variableBinding != binding && variableBinding.useFlag == LocalVariableBinding.USED && variableBinding.resolvedPosition != -1) { |
541 |
this.currentFrame.removeLocals(variableBinding.resolvedPosition); |
664 |
this.currentFrame.removeLocals(variableBinding.resolvedPosition); |
542 |
} |
665 |
} |
543 |
} |
666 |
} |
544 |
} |
667 |
} |
545 |
} |
668 |
} |
546 |
this.storeStackMapFrame(); |
669 |
this.storeStackMapFrame(); |
547 |
super.exitUserScope(currentScope, binding); |
670 |
super.exitUserScope(currentScope, binding); |
548 |
} |
671 |
} |
549 |
public void f2d() { |
672 |
public void f2d() { |
550 |
super.f2d(); |
673 |
super.f2d(); |
551 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.DOUBLE); |
674 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
675 |
if (numberOfStackItems >= 1) { |
676 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.DOUBLE); |
677 |
} |
552 |
} |
678 |
} |
553 |
public void f2i() { |
679 |
public void f2i() { |
554 |
super.f2i(); |
680 |
super.f2i(); |
555 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.INT); |
681 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
682 |
if (numberOfStackItems >= 1) { |
683 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.INT); |
684 |
} |
556 |
} |
685 |
} |
557 |
public void f2l() { |
686 |
public void f2l() { |
558 |
super.f2l(); |
687 |
super.f2l(); |
559 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.LONG); |
688 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
689 |
if (numberOfStackItems >= 1) { |
690 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.LONG); |
691 |
} |
560 |
} |
692 |
} |
561 |
public void fadd() { |
693 |
public void fadd() { |
562 |
super.fadd(); |
694 |
super.fadd(); |
563 |
this.currentFrame.numberOfStackItems--; |
695 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
696 |
this.currentFrame.numberOfStackItems--; |
697 |
} |
564 |
} |
698 |
} |
565 |
public void faload() { |
699 |
public void faload() { |
566 |
super.faload(); |
700 |
super.faload(); |
567 |
this.currentFrame.numberOfStackItems--; |
701 |
if (this.currentFrame.numberOfStackItems >= 2) { |
568 |
this.currentFrame.replaceWithElementType(); |
702 |
this.currentFrame.numberOfStackItems--; |
|
|
703 |
this.currentFrame.replaceWithElementType(); |
704 |
} |
569 |
} |
705 |
} |
570 |
public void fastore() { |
706 |
public void fastore() { |
571 |
super.fastore(); |
707 |
super.fastore(); |
572 |
this.currentFrame.numberOfStackItems-=3; |
708 |
if (this.currentFrame.numberOfStackItems >= 3) { |
|
|
709 |
this.currentFrame.numberOfStackItems-=3; |
710 |
} |
573 |
} |
711 |
} |
574 |
public void fcmpg() { |
712 |
public void fcmpg() { |
575 |
super.fcmpg(); |
713 |
super.fcmpg(); |
576 |
this.currentFrame.numberOfStackItems-=2; |
714 |
if (this.currentFrame.numberOfStackItems >= 2) { |
577 |
this.currentFrame.addStackItem(TypeBinding.INT); |
715 |
this.currentFrame.numberOfStackItems-=2; |
|
|
716 |
this.currentFrame.addStackItem(TypeBinding.INT); |
717 |
} |
578 |
} |
718 |
} |
579 |
public void fcmpl() { |
719 |
public void fcmpl() { |
580 |
super.fcmpl(); |
720 |
super.fcmpl(); |
581 |
this.currentFrame.numberOfStackItems-=2; |
721 |
if (this.currentFrame.numberOfStackItems >= 2) { |
582 |
this.currentFrame.addStackItem(TypeBinding.INT); |
722 |
this.currentFrame.numberOfStackItems-=2; |
|
|
723 |
this.currentFrame.addStackItem(TypeBinding.INT); |
724 |
} |
583 |
} |
725 |
} |
584 |
public void fconst_0() { |
726 |
public void fconst_0() { |
585 |
super.fconst_0(); |
727 |
super.fconst_0(); |
586 |
this.currentFrame.addStackItem(TypeBinding.FLOAT); |
728 |
this.currentFrame.addStackItem(TypeBinding.FLOAT); |
587 |
} |
729 |
} |
588 |
public void fconst_1() { |
730 |
public void fconst_1() { |
589 |
super.fconst_1(); |
731 |
super.fconst_1(); |
590 |
this.currentFrame.addStackItem(TypeBinding.FLOAT); |
732 |
this.currentFrame.addStackItem(TypeBinding.FLOAT); |
591 |
} |
733 |
} |
592 |
public void fconst_2() { |
734 |
public void fconst_2() { |
593 |
super.fconst_2(); |
735 |
super.fconst_2(); |
594 |
this.currentFrame.addStackItem(TypeBinding.FLOAT); |
736 |
this.currentFrame.addStackItem(TypeBinding.FLOAT); |
595 |
} |
737 |
} |
596 |
public void fdiv() { |
738 |
public void fdiv() { |
597 |
super.fdiv(); |
739 |
super.fdiv(); |
598 |
this.currentFrame.numberOfStackItems--; |
740 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
741 |
this.currentFrame.numberOfStackItems--; |
742 |
} |
599 |
} |
743 |
} |
600 |
public void fload(int iArg) { |
744 |
public void fload(int iArg) { |
601 |
super.fload(iArg); |
745 |
super.fload(iArg); |
602 |
this.currentFrame.addStackItem(getLocal(iArg, this.currentFrame)); |
746 |
this.currentFrame.addStackItem(getLocal(iArg, this.currentFrame)); |
603 |
} |
747 |
} |
604 |
public void fload_0() { |
748 |
public void fload_0() { |
605 |
super.fload_0(); |
749 |
super.fload_0(); |
606 |
this.currentFrame.addStackItem(getLocal(0, this.currentFrame)); |
750 |
this.currentFrame.addStackItem(getLocal(0, this.currentFrame)); |
607 |
} |
751 |
} |
608 |
public void fload_1() { |
752 |
public void fload_1() { |
609 |
super.fload_1(); |
753 |
super.fload_1(); |
610 |
this.currentFrame.addStackItem(getLocal(1, this.currentFrame)); |
754 |
this.currentFrame.addStackItem(getLocal(1, this.currentFrame)); |
611 |
} |
755 |
} |
612 |
public void fload_2() { |
756 |
public void fload_2() { |
613 |
super.fload_2(); |
757 |
super.fload_2(); |
614 |
this.currentFrame.addStackItem(getLocal(2, this.currentFrame)); |
758 |
this.currentFrame.addStackItem(getLocal(2, this.currentFrame)); |
615 |
} |
759 |
} |
616 |
public void fload_3() { |
760 |
public void fload_3() { |
617 |
super.fload_3(); |
761 |
super.fload_3(); |
618 |
this.currentFrame.addStackItem(getLocal(3, this.currentFrame)); |
762 |
this.currentFrame.addStackItem(getLocal(3, this.currentFrame)); |
619 |
} |
763 |
} |
620 |
public void fmul() { |
764 |
public void fmul() { |
621 |
super.fmul(); |
765 |
super.fmul(); |
622 |
this.currentFrame.numberOfStackItems--; |
766 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
767 |
this.currentFrame.numberOfStackItems--; |
768 |
} |
623 |
} |
769 |
} |
624 |
public void frem() { |
770 |
public void frem() { |
625 |
super.frem(); |
771 |
super.frem(); |
626 |
this.currentFrame.numberOfStackItems--; |
772 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
773 |
this.currentFrame.numberOfStackItems--; |
774 |
} |
627 |
} |
775 |
} |
628 |
public void freturn() { |
776 |
public void freturn() { |
629 |
super.freturn(); |
777 |
super.freturn(); |
630 |
this.currentFrame.numberOfStackItems--; |
778 |
if (this.currentFrame.numberOfStackItems >= 1) { |
631 |
this.framePositions.add(new Integer(this.position)); |
779 |
this.currentFrame.numberOfStackItems--; |
|
|
780 |
} |
781 |
this.framePositions.add(new Integer(this.position)); |
632 |
} |
782 |
} |
633 |
public void fstore(int iArg) { |
783 |
public void fstore(int iArg) { |
634 |
super.fstore(iArg); |
784 |
super.fstore(iArg); |
635 |
this.currentFrame.putLocal(iArg, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
785 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
636 |
this.currentFrame.numberOfStackItems--; |
786 |
if (numberOfStackItems >= 1) { |
|
|
787 |
this.currentFrame.putLocal(iArg, this.currentFrame.stackItems[numberOfStackItems - 1]); |
788 |
this.currentFrame.numberOfStackItems--; |
789 |
} |
637 |
} |
790 |
} |
638 |
public void fstore_0() { |
791 |
public void fstore_0() { |
639 |
super.fstore_0(); |
792 |
super.fstore_0(); |
640 |
this.currentFrame.putLocal(0, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
793 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
641 |
this.currentFrame.numberOfStackItems--; |
794 |
if (numberOfStackItems >= 1) { |
|
|
795 |
this.currentFrame.putLocal(0, this.currentFrame.stackItems[numberOfStackItems - 1]); |
796 |
this.currentFrame.numberOfStackItems--; |
797 |
} |
642 |
} |
798 |
} |
643 |
public void fstore_1() { |
799 |
public void fstore_1() { |
644 |
super.fstore_1(); |
800 |
super.fstore_1(); |
645 |
this.currentFrame.putLocal(1, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
801 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
646 |
this.currentFrame.numberOfStackItems--; |
802 |
if (numberOfStackItems >= 1) { |
|
|
803 |
this.currentFrame.putLocal(1, this.currentFrame.stackItems[numberOfStackItems - 1]); |
804 |
this.currentFrame.numberOfStackItems--; |
805 |
} |
647 |
} |
806 |
} |
648 |
public void fstore_2() { |
807 |
public void fstore_2() { |
649 |
super.fstore_2(); |
808 |
super.fstore_2(); |
650 |
this.currentFrame.putLocal(2, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
809 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
651 |
this.currentFrame.numberOfStackItems--; |
810 |
if (numberOfStackItems >= 1) { |
|
|
811 |
this.currentFrame.putLocal(2, this.currentFrame.stackItems[numberOfStackItems - 1]); |
812 |
this.currentFrame.numberOfStackItems--; |
813 |
} |
652 |
} |
814 |
} |
653 |
public void fstore_3() { |
815 |
public void fstore_3() { |
654 |
super.fstore_3(); |
816 |
super.fstore_3(); |
655 |
this.currentFrame.putLocal(3, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
817 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
656 |
this.currentFrame.numberOfStackItems--; |
818 |
if (numberOfStackItems >= 1) { |
|
|
819 |
this.currentFrame.putLocal(3, this.currentFrame.stackItems[numberOfStackItems - 1]); |
820 |
this.currentFrame.numberOfStackItems--; |
821 |
} |
657 |
} |
822 |
} |
658 |
public void fsub() { |
823 |
public void fsub() { |
659 |
super.fsub(); |
824 |
super.fsub(); |
660 |
this.currentFrame.numberOfStackItems--; |
825 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
826 |
this.currentFrame.numberOfStackItems--; |
827 |
} |
661 |
} |
828 |
} |
662 |
public void generateBoxingConversion(int unboxedTypeID) { |
829 |
public void generateBoxingConversion(int unboxedTypeID) { |
663 |
super.generateBoxingConversion(unboxedTypeID); |
830 |
super.generateBoxingConversion(unboxedTypeID); |
664 |
VerificationTypeInfo info = null; |
831 |
VerificationTypeInfo info = null; |
665 |
switch (unboxedTypeID) { |
832 |
switch (unboxedTypeID) { |
666 |
case TypeIds.T_byte : |
833 |
case TypeIds.T_byte : |
667 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangByte, ConstantPool.JavaLangByteConstantPoolName); |
834 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangByte, ConstantPool.JavaLangByteConstantPoolName); |
668 |
break; |
835 |
break; |
669 |
case TypeIds.T_short : |
836 |
case TypeIds.T_short : |
670 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangShort, ConstantPool.JavaLangShortConstantPoolName); |
837 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangShort, ConstantPool.JavaLangShortConstantPoolName); |
671 |
break; |
838 |
break; |
672 |
case TypeIds.T_char : |
839 |
case TypeIds.T_char : |
673 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangCharacter, ConstantPool.JavaLangCharacterConstantPoolName); |
840 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangCharacter, ConstantPool.JavaLangCharacterConstantPoolName); |
674 |
break; |
841 |
break; |
675 |
case TypeIds.T_int : |
842 |
case TypeIds.T_int : |
676 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangInteger, ConstantPool.JavaLangIntegerConstantPoolName); |
843 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangInteger, ConstantPool.JavaLangIntegerConstantPoolName); |
677 |
break; |
844 |
break; |
678 |
case TypeIds.T_long : |
845 |
case TypeIds.T_long : |
679 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangLong, ConstantPool.JavaLangLongConstantPoolName); |
846 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangLong, ConstantPool.JavaLangLongConstantPoolName); |
680 |
break; |
847 |
break; |
681 |
case TypeIds.T_float : |
848 |
case TypeIds.T_float : |
682 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangFloat, ConstantPool.JavaLangFloatConstantPoolName); |
849 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangFloat, ConstantPool.JavaLangFloatConstantPoolName); |
683 |
break; |
850 |
break; |
684 |
case TypeIds.T_double : |
851 |
case TypeIds.T_double : |
685 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangDouble, ConstantPool.JavaLangDoubleConstantPoolName); |
852 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangDouble, ConstantPool.JavaLangDoubleConstantPoolName); |
686 |
break; |
853 |
break; |
687 |
case TypeIds.T_boolean : |
854 |
case TypeIds.T_boolean : |
688 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangBoolean, ConstantPool.JavaLangBooleanConstantPoolName); |
855 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangBoolean, ConstantPool.JavaLangBooleanConstantPoolName); |
689 |
} |
856 |
} |
690 |
if (info != null) { |
857 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
691 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = info; |
858 |
if (info != null && (numberOfStackItems >= 1)) { |
|
|
859 |
this.currentFrame.stackItems[numberOfStackItems - 1] = info; |
692 |
} |
860 |
} |
693 |
} |
861 |
} |
694 |
public void generateOuterAccess(Object[] mappingSequence, ASTNode invocationSite, Binding target, Scope scope) { |
862 |
public void generateOuterAccess(Object[] mappingSequence, ASTNode invocationSite, Binding target, Scope scope) { |
695 |
if (mappingSequence == null) { |
863 |
if (mappingSequence == null) { |
696 |
if (target instanceof LocalVariableBinding) { |
864 |
if (target instanceof LocalVariableBinding) { |
697 |
scope.problemReporter().needImplementation(); //TODO (philippe) should improve local emulation failure reporting |
865 |
scope.problemReporter().needImplementation(); //TODO (philippe) should improve local emulation failure reporting |
698 |
} else { |
866 |
} else { |
699 |
scope.problemReporter().noSuchEnclosingInstance((ReferenceBinding)target, invocationSite, false); |
867 |
scope.problemReporter().noSuchEnclosingInstance((ReferenceBinding)target, invocationSite, false); |
700 |
this.currentFrame.addStackItem((ReferenceBinding)target); |
868 |
this.currentFrame.addStackItem((ReferenceBinding)target); |
701 |
} |
869 |
} |
702 |
return; |
870 |
return; |
703 |
} |
871 |
} |
704 |
if (mappingSequence == BlockScope.NoEnclosingInstanceInConstructorCall) { |
872 |
if (mappingSequence == BlockScope.NoEnclosingInstanceInConstructorCall) { |
705 |
scope.problemReporter().noSuchEnclosingInstance((ReferenceBinding)target, invocationSite, true); |
873 |
scope.problemReporter().noSuchEnclosingInstance((ReferenceBinding)target, invocationSite, true); |
706 |
this.currentFrame.addStackItem((ReferenceBinding)target); |
874 |
this.currentFrame.addStackItem((ReferenceBinding)target); |
707 |
return; |
875 |
return; |
708 |
} else if (mappingSequence == BlockScope.NoEnclosingInstanceInStaticContext) { |
876 |
} else if (mappingSequence == BlockScope.NoEnclosingInstanceInStaticContext) { |
709 |
scope.problemReporter().noSuchEnclosingInstance((ReferenceBinding)target, invocationSite, false); |
877 |
scope.problemReporter().noSuchEnclosingInstance((ReferenceBinding)target, invocationSite, false); |
710 |
this.currentFrame.addStackItem((ReferenceBinding)target); |
878 |
this.currentFrame.addStackItem((ReferenceBinding)target); |
711 |
return; |
879 |
return; |
712 |
} |
880 |
} |
713 |
|
881 |
|
714 |
if (mappingSequence == BlockScope.EmulationPathToImplicitThis) { |
882 |
if (mappingSequence == BlockScope.EmulationPathToImplicitThis) { |
715 |
this.aload_0(); |
883 |
this.aload_0(); |
716 |
return; |
884 |
return; |
717 |
} else if (mappingSequence[0] instanceof FieldBinding) { |
885 |
} else if (mappingSequence[0] instanceof FieldBinding) { |
718 |
FieldBinding fieldBinding = (FieldBinding) mappingSequence[0]; |
886 |
FieldBinding fieldBinding = (FieldBinding) mappingSequence[0]; |
719 |
this.aload_0(); |
887 |
this.aload_0(); |
720 |
this.getfield(fieldBinding); |
888 |
this.getfield(fieldBinding); |
721 |
} else { |
889 |
} else { |
722 |
load((LocalVariableBinding) mappingSequence[0]); |
890 |
load((LocalVariableBinding) mappingSequence[0]); |
723 |
} |
891 |
} |
724 |
for (int i = 1, length = mappingSequence.length; i < length; i++) { |
892 |
for (int i = 1, length = mappingSequence.length; i < length; i++) { |
725 |
if (mappingSequence[i] instanceof FieldBinding) { |
893 |
if (mappingSequence[i] instanceof FieldBinding) { |
726 |
FieldBinding fieldBinding = (FieldBinding) mappingSequence[i]; |
894 |
FieldBinding fieldBinding = (FieldBinding) mappingSequence[i]; |
727 |
this.getfield(fieldBinding); |
895 |
this.getfield(fieldBinding); |
728 |
} else { |
896 |
} else { |
729 |
this.invokestatic((MethodBinding) mappingSequence[i]); |
897 |
this.invokestatic((MethodBinding) mappingSequence[i]); |
730 |
} |
898 |
} |
731 |
} |
899 |
} |
732 |
} |
900 |
} |
733 |
public void generateUnboxingConversion(int unboxedTypeID) { |
901 |
public void generateUnboxingConversion(int unboxedTypeID) { |
734 |
super.generateUnboxingConversion(unboxedTypeID); |
902 |
super.generateUnboxingConversion(unboxedTypeID); |
735 |
VerificationTypeInfo info = null; |
903 |
VerificationTypeInfo info = null; |
736 |
switch (unboxedTypeID) { |
904 |
switch (unboxedTypeID) { |
737 |
case TypeIds.T_byte : |
905 |
case TypeIds.T_byte : |
738 |
info = new VerificationTypeInfo(TypeBinding.BYTE); |
906 |
info = new VerificationTypeInfo(TypeBinding.BYTE); |
739 |
break; |
907 |
break; |
740 |
case TypeIds.T_short : |
908 |
case TypeIds.T_short : |
741 |
info = new VerificationTypeInfo(TypeBinding.SHORT); |
909 |
info = new VerificationTypeInfo(TypeBinding.SHORT); |
742 |
break; |
910 |
break; |
743 |
case TypeIds.T_char : |
911 |
case TypeIds.T_char : |
744 |
info = new VerificationTypeInfo(TypeBinding.CHAR); |
912 |
info = new VerificationTypeInfo(TypeBinding.CHAR); |
745 |
break; |
913 |
break; |
746 |
case TypeIds.T_int : |
914 |
case TypeIds.T_int : |
747 |
info = new VerificationTypeInfo(TypeBinding.INT); |
915 |
info = new VerificationTypeInfo(TypeBinding.INT); |
748 |
break; |
916 |
break; |
749 |
case TypeIds.T_long : |
917 |
case TypeIds.T_long : |
750 |
info = new VerificationTypeInfo(TypeBinding.LONG); |
918 |
info = new VerificationTypeInfo(TypeBinding.LONG); |
751 |
break; |
919 |
break; |
752 |
case TypeIds.T_float : |
920 |
case TypeIds.T_float : |
753 |
info = new VerificationTypeInfo(TypeBinding.FLOAT); |
921 |
info = new VerificationTypeInfo(TypeBinding.FLOAT); |
754 |
break; |
922 |
break; |
755 |
case TypeIds.T_double : |
923 |
case TypeIds.T_double : |
756 |
info = new VerificationTypeInfo(TypeBinding.DOUBLE); |
924 |
info = new VerificationTypeInfo(TypeBinding.DOUBLE); |
757 |
break; |
925 |
break; |
758 |
case TypeIds.T_boolean : |
926 |
case TypeIds.T_boolean : |
759 |
info = new VerificationTypeInfo(TypeBinding.BOOLEAN); |
927 |
info = new VerificationTypeInfo(TypeBinding.BOOLEAN); |
760 |
} |
928 |
} |
761 |
if (info != null) { |
929 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
762 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = info; |
930 |
if (info != null && (numberOfStackItems >= 1)) { |
763 |
} |
931 |
this.currentFrame.stackItems[numberOfStackItems - 1] = info; |
|
|
932 |
} |
764 |
} |
933 |
} |
765 |
public void getBaseTypeValue(int baseTypeID) { |
934 |
public void getBaseTypeValue(int baseTypeID) { |
766 |
super.getBaseTypeValue(baseTypeID); |
935 |
super.getBaseTypeValue(baseTypeID); |
767 |
VerificationTypeInfo info = null; |
936 |
VerificationTypeInfo info = null; |
768 |
switch (baseTypeID) { |
937 |
switch (baseTypeID) { |
769 |
case TypeIds.T_byte : |
938 |
case TypeIds.T_byte : |
770 |
info = new VerificationTypeInfo(TypeBinding.BYTE); |
939 |
info = new VerificationTypeInfo(TypeBinding.BYTE); |
771 |
break; |
940 |
break; |
772 |
case TypeIds.T_short : |
941 |
case TypeIds.T_short : |
773 |
info = new VerificationTypeInfo(TypeBinding.SHORT); |
942 |
info = new VerificationTypeInfo(TypeBinding.SHORT); |
774 |
break; |
943 |
break; |
775 |
case TypeIds.T_char : |
944 |
case TypeIds.T_char : |
776 |
info = new VerificationTypeInfo(TypeBinding.CHAR); |
945 |
info = new VerificationTypeInfo(TypeBinding.CHAR); |
777 |
break; |
946 |
break; |
778 |
case TypeIds.T_int : |
947 |
case TypeIds.T_int : |
779 |
info = new VerificationTypeInfo(TypeBinding.INT); |
948 |
info = new VerificationTypeInfo(TypeBinding.INT); |
780 |
break; |
949 |
break; |
781 |
case TypeIds.T_long : |
950 |
case TypeIds.T_long : |
782 |
info = new VerificationTypeInfo(TypeBinding.LONG); |
951 |
info = new VerificationTypeInfo(TypeBinding.LONG); |
783 |
break; |
952 |
break; |
784 |
case TypeIds.T_float : |
953 |
case TypeIds.T_float : |
785 |
info = new VerificationTypeInfo(TypeBinding.FLOAT); |
954 |
info = new VerificationTypeInfo(TypeBinding.FLOAT); |
786 |
break; |
955 |
break; |
787 |
case TypeIds.T_double : |
956 |
case TypeIds.T_double : |
788 |
info = new VerificationTypeInfo(TypeBinding.DOUBLE); |
957 |
info = new VerificationTypeInfo(TypeBinding.DOUBLE); |
789 |
break; |
958 |
break; |
790 |
case TypeIds.T_boolean : |
959 |
case TypeIds.T_boolean : |
791 |
info = new VerificationTypeInfo(TypeBinding.BOOLEAN); |
960 |
info = new VerificationTypeInfo(TypeBinding.BOOLEAN); |
792 |
} |
961 |
} |
793 |
if (info != null) { |
962 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
794 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = info; |
963 |
if (info != null && (numberOfStackItems >= 1)) { |
795 |
} |
964 |
this.currentFrame.stackItems[numberOfStackItems - 1] = info; |
|
|
965 |
} |
796 |
} |
966 |
} |
797 |
public void getfield(FieldBinding fieldBinding) { |
967 |
public void getfield(FieldBinding fieldBinding) { |
798 |
super.getfield(fieldBinding); |
968 |
super.getfield(fieldBinding); |
799 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(fieldBinding.type); |
969 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
970 |
if (numberOfStackItems >= 1) { |
971 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(fieldBinding.type); |
972 |
} |
800 |
} |
973 |
} |
801 |
private VerificationTypeInfo getLocal(int resolvedPosition, StackMapFrame frame) { |
974 |
private VerificationTypeInfo getLocal(int resolvedPosition, StackMapFrame frame) { |
802 |
VerificationTypeInfo verificationTypeInfo = frame.locals[resolvedPosition]; |
975 |
VerificationTypeInfo verificationTypeInfo = frame.locals[resolvedPosition]; |
803 |
|
976 |
|
804 |
if (verificationTypeInfo == null) { |
977 |
if (verificationTypeInfo == null) { |
805 |
return null; |
978 |
return null; |
806 |
} |
979 |
} |
807 |
try { |
980 |
try { |
808 |
if (verificationTypeInfo.tag == VerificationTypeInfo.ITEM_UNINITIALIZED_THIS |
981 |
if (verificationTypeInfo.tag == VerificationTypeInfo.ITEM_UNINITIALIZED_THIS |
809 |
|| verificationTypeInfo.tag == VerificationTypeInfo.ITEM_UNINITIALIZED) { |
982 |
|| verificationTypeInfo.tag == VerificationTypeInfo.ITEM_UNINITIALIZED) { |
810 |
return verificationTypeInfo; |
983 |
return verificationTypeInfo; |
811 |
} |
984 |
} |
812 |
return (VerificationTypeInfo) verificationTypeInfo.clone(); |
985 |
return (VerificationTypeInfo) verificationTypeInfo.clone(); |
813 |
} catch (CloneNotSupportedException e) { |
986 |
} catch (CloneNotSupportedException e) { |
814 |
return verificationTypeInfo; |
987 |
return verificationTypeInfo; |
815 |
} |
988 |
} |
816 |
} |
989 |
} |
817 |
protected int getPosition() { |
990 |
protected int getPosition() { |
818 |
// need to record a new stack frame at this position |
991 |
// need to record a new stack frame at this position |
819 |
int pos = super.getPosition(); |
992 |
int pos = super.getPosition(); |
820 |
this.framePositions.add(new Integer(this.position)); |
993 |
this.framePositions.add(new Integer(this.position)); |
821 |
storeStackMapFrame(); |
994 |
storeStackMapFrame(); |
822 |
return pos; |
995 |
return pos; |
823 |
} |
996 |
} |
824 |
public void getstatic(FieldBinding fieldBinding) { |
997 |
public void getstatic(FieldBinding fieldBinding) { |
825 |
super.getstatic(fieldBinding); |
998 |
super.getstatic(fieldBinding); |
826 |
this.currentFrame.addStackItem(fieldBinding.type); |
999 |
this.currentFrame.addStackItem(fieldBinding.type); |
827 |
} |
1000 |
} |
828 |
public void getTYPE(int baseTypeID) { |
1001 |
public void getTYPE(int baseTypeID) { |
829 |
super.getTYPE(baseTypeID); |
1002 |
super.getTYPE(baseTypeID); |
830 |
this.currentFrame.addStackItem(new VerificationTypeInfo(TypeIds.T_JavaLangClass, ConstantPool.JavaLangClassConstantPoolName)); |
1003 |
this.currentFrame.addStackItem(new VerificationTypeInfo(TypeIds.T_JavaLangClass, ConstantPool.JavaLangClassConstantPoolName)); |
831 |
} |
1004 |
} |
832 |
/** |
1005 |
/** |
833 |
* We didn't call it goto, because there is a conflit with the goto keyword |
1006 |
* We didn't call it goto, because there is a conflit with the goto keyword |
834 |
*/ |
1007 |
*/ |
835 |
public void goto_(BranchLabel label) { |
1008 |
public void goto_(BranchLabel label) { |
836 |
super.goto_(label); |
1009 |
super.goto_(label); |
837 |
this.framePositions.add(new Integer(this.position)); |
1010 |
this.framePositions.add(new Integer(this.position)); |
838 |
} |
1011 |
} |
839 |
public void goto_w(BranchLabel label) { |
1012 |
public void goto_w(BranchLabel label) { |
840 |
super.goto_w(label); |
1013 |
super.goto_w(label); |
841 |
this.framePositions.add(new Integer(this.position)); |
1014 |
this.framePositions.add(new Integer(this.position)); |
842 |
} |
1015 |
} |
843 |
public void i2b() { |
1016 |
public void i2b() { |
844 |
super.i2b(); |
1017 |
super.i2b(); |
845 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.BYTE); |
1018 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
1019 |
if (numberOfStackItems >= 1) { |
1020 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.BYTE); |
1021 |
} |
846 |
} |
1022 |
} |
847 |
public void i2c() { |
1023 |
public void i2c() { |
848 |
super.i2c(); |
1024 |
super.i2c(); |
849 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.CHAR); |
1025 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
1026 |
if (numberOfStackItems >= 1) { |
1027 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.CHAR); |
1028 |
} |
850 |
} |
1029 |
} |
851 |
public void i2d() { |
1030 |
public void i2d() { |
852 |
super.i2d(); |
1031 |
super.i2d(); |
853 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.DOUBLE); |
1032 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
1033 |
if (numberOfStackItems >= 1) { |
1034 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.DOUBLE); |
1035 |
} |
854 |
} |
1036 |
} |
855 |
public void i2f() { |
1037 |
public void i2f() { |
856 |
super.i2f(); |
1038 |
super.i2f(); |
857 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.FLOAT); |
1039 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
1040 |
if (numberOfStackItems >= 1) { |
1041 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.FLOAT); |
1042 |
} |
858 |
} |
1043 |
} |
859 |
public void i2l() { |
1044 |
public void i2l() { |
860 |
super.i2l(); |
1045 |
super.i2l(); |
861 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.LONG); |
1046 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
1047 |
if (numberOfStackItems >= 1) { |
1048 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.LONG); |
1049 |
} |
862 |
} |
1050 |
} |
863 |
public void i2s() { |
1051 |
public void i2s() { |
864 |
super.i2s(); |
1052 |
super.i2s(); |
865 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.SHORT); |
1053 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
1054 |
if (numberOfStackItems >= 1) { |
1055 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.SHORT); |
1056 |
} |
866 |
} |
1057 |
} |
867 |
public void iadd() { |
1058 |
public void iadd() { |
868 |
super.iadd(); |
1059 |
super.iadd(); |
869 |
this.currentFrame.numberOfStackItems--; |
1060 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1061 |
this.currentFrame.numberOfStackItems--; |
1062 |
} |
870 |
} |
1063 |
} |
871 |
public void iaload() { |
1064 |
public void iaload() { |
872 |
super.iaload(); |
1065 |
super.iaload(); |
873 |
this.currentFrame.numberOfStackItems--; |
1066 |
if (this.currentFrame.numberOfStackItems >= 1) { |
874 |
this.currentFrame.replaceWithElementType(); |
1067 |
this.currentFrame.numberOfStackItems--; |
|
|
1068 |
this.currentFrame.replaceWithElementType(); |
1069 |
} |
875 |
} |
1070 |
} |
876 |
public void iand() { |
1071 |
public void iand() { |
877 |
super.iand(); |
1072 |
super.iand(); |
878 |
this.currentFrame.numberOfStackItems--; |
1073 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1074 |
this.currentFrame.numberOfStackItems--; |
1075 |
} |
879 |
} |
1076 |
} |
880 |
public void iastore() { |
1077 |
public void iastore() { |
881 |
super.iastore(); |
1078 |
super.iastore(); |
882 |
this.currentFrame.numberOfStackItems-=3; |
1079 |
if (this.currentFrame.numberOfStackItems >= 3) { |
|
|
1080 |
this.currentFrame.numberOfStackItems-=3; |
1081 |
} |
883 |
} |
1082 |
} |
884 |
public void iconst_0() { |
1083 |
public void iconst_0() { |
885 |
super.iconst_0(); |
1084 |
super.iconst_0(); |
886 |
this.currentFrame.addStackItem(TypeBinding.INT); |
1085 |
this.currentFrame.addStackItem(TypeBinding.INT); |
887 |
} |
1086 |
} |
888 |
public void iconst_1() { |
1087 |
public void iconst_1() { |
889 |
super.iconst_1(); |
1088 |
super.iconst_1(); |
890 |
this.currentFrame.addStackItem(TypeBinding.INT); |
1089 |
this.currentFrame.addStackItem(TypeBinding.INT); |
891 |
} |
1090 |
} |
892 |
public void iconst_2() { |
1091 |
public void iconst_2() { |
893 |
super.iconst_2(); |
1092 |
super.iconst_2(); |
894 |
this.currentFrame.addStackItem(TypeBinding.INT); |
1093 |
this.currentFrame.addStackItem(TypeBinding.INT); |
895 |
} |
1094 |
} |
896 |
public void iconst_3() { |
1095 |
public void iconst_3() { |
897 |
super.iconst_3(); |
1096 |
super.iconst_3(); |
898 |
this.currentFrame.addStackItem(TypeBinding.INT); |
1097 |
this.currentFrame.addStackItem(TypeBinding.INT); |
899 |
} |
1098 |
} |
900 |
public void iconst_4() { |
1099 |
public void iconst_4() { |
901 |
super.iconst_4(); |
1100 |
super.iconst_4(); |
902 |
this.currentFrame.addStackItem(TypeBinding.INT); |
1101 |
this.currentFrame.addStackItem(TypeBinding.INT); |
903 |
} |
1102 |
} |
904 |
public void iconst_5() { |
1103 |
public void iconst_5() { |
905 |
super.iconst_5(); |
1104 |
super.iconst_5(); |
906 |
this.currentFrame.addStackItem(TypeBinding.INT); |
1105 |
this.currentFrame.addStackItem(TypeBinding.INT); |
907 |
} |
1106 |
} |
908 |
public void iconst_m1() { |
1107 |
public void iconst_m1() { |
909 |
super.iconst_m1(); |
1108 |
super.iconst_m1(); |
910 |
this.currentFrame.addStackItem(TypeBinding.INT); |
1109 |
this.currentFrame.addStackItem(TypeBinding.INT); |
911 |
} |
1110 |
} |
912 |
public void idiv() { |
1111 |
public void idiv() { |
913 |
super.idiv(); |
1112 |
super.idiv(); |
914 |
this.currentFrame.numberOfStackItems--; |
1113 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1114 |
this.currentFrame.numberOfStackItems--; |
1115 |
} |
915 |
} |
1116 |
} |
916 |
public void if_acmpeq(BranchLabel lbl) { |
1117 |
public void if_acmpeq(BranchLabel lbl) { |
917 |
super.if_acmpeq(lbl); |
1118 |
super.if_acmpeq(lbl); |
918 |
this.currentFrame.numberOfStackItems-=2; |
1119 |
if (this.currentFrame.numberOfStackItems >= 2) { |
|
|
1120 |
this.currentFrame.numberOfStackItems-=2; |
1121 |
} |
919 |
} |
1122 |
} |
920 |
public void if_acmpne(BranchLabel lbl) { |
1123 |
public void if_acmpne(BranchLabel lbl) { |
921 |
super.if_acmpne(lbl); |
1124 |
super.if_acmpne(lbl); |
922 |
this.currentFrame.numberOfStackItems-=2; |
1125 |
if (this.currentFrame.numberOfStackItems >= 2) { |
|
|
1126 |
this.currentFrame.numberOfStackItems-=2; |
1127 |
} |
923 |
} |
1128 |
} |
924 |
public void if_icmpeq(BranchLabel lbl) { |
1129 |
public void if_icmpeq(BranchLabel lbl) { |
925 |
super.if_icmpeq(lbl); |
1130 |
super.if_icmpeq(lbl); |
926 |
this.currentFrame.numberOfStackItems-=2; |
1131 |
if (this.currentFrame.numberOfStackItems >= 2) { |
|
|
1132 |
this.currentFrame.numberOfStackItems-=2; |
1133 |
} |
927 |
} |
1134 |
} |
928 |
public void if_icmpge(BranchLabel lbl) { |
1135 |
public void if_icmpge(BranchLabel lbl) { |
929 |
super.if_icmpge(lbl); |
1136 |
super.if_icmpge(lbl); |
930 |
this.currentFrame.numberOfStackItems-=2; |
1137 |
if (this.currentFrame.numberOfStackItems >= 2) { |
|
|
1138 |
this.currentFrame.numberOfStackItems-=2; |
1139 |
} |
931 |
} |
1140 |
} |
932 |
public void if_icmpgt(BranchLabel lbl) { |
1141 |
public void if_icmpgt(BranchLabel lbl) { |
933 |
super.if_icmpgt(lbl); |
1142 |
super.if_icmpgt(lbl); |
934 |
this.currentFrame.numberOfStackItems-=2; |
1143 |
if (this.currentFrame.numberOfStackItems >= 2) { |
|
|
1144 |
this.currentFrame.numberOfStackItems-=2; |
1145 |
} |
935 |
} |
1146 |
} |
936 |
public void if_icmple(BranchLabel lbl) { |
1147 |
public void if_icmple(BranchLabel lbl) { |
937 |
super.if_icmple(lbl); |
1148 |
super.if_icmple(lbl); |
938 |
this.currentFrame.numberOfStackItems-=2; |
1149 |
if (this.currentFrame.numberOfStackItems >= 2) { |
|
|
1150 |
this.currentFrame.numberOfStackItems-=2; |
1151 |
} |
939 |
} |
1152 |
} |
940 |
public void if_icmplt(BranchLabel lbl) { |
1153 |
public void if_icmplt(BranchLabel lbl) { |
941 |
super.if_icmplt(lbl); |
1154 |
super.if_icmplt(lbl); |
942 |
this.currentFrame.numberOfStackItems-=2; |
1155 |
if (this.currentFrame.numberOfStackItems >= 2) { |
|
|
1156 |
this.currentFrame.numberOfStackItems-=2; |
1157 |
} |
943 |
} |
1158 |
} |
944 |
public void if_icmpne(BranchLabel lbl) { |
1159 |
public void if_icmpne(BranchLabel lbl) { |
945 |
super.if_icmpne(lbl); |
1160 |
super.if_icmpne(lbl); |
946 |
this.currentFrame.numberOfStackItems-=2; |
1161 |
if (this.currentFrame.numberOfStackItems >= 2) { |
|
|
1162 |
this.currentFrame.numberOfStackItems-=2; |
1163 |
} |
947 |
} |
1164 |
} |
948 |
public void ifeq(BranchLabel lbl) { |
1165 |
public void ifeq(BranchLabel lbl) { |
949 |
super.ifeq(lbl); |
1166 |
super.ifeq(lbl); |
950 |
this.currentFrame.numberOfStackItems--; |
1167 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1168 |
this.currentFrame.numberOfStackItems--; |
1169 |
} |
951 |
} |
1170 |
} |
952 |
public void ifge(BranchLabel lbl) { |
1171 |
public void ifge(BranchLabel lbl) { |
953 |
super.ifge(lbl); |
1172 |
super.ifge(lbl); |
954 |
this.currentFrame.numberOfStackItems--; |
1173 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1174 |
this.currentFrame.numberOfStackItems--; |
1175 |
} |
955 |
} |
1176 |
} |
956 |
public void ifgt(BranchLabel lbl) { |
1177 |
public void ifgt(BranchLabel lbl) { |
957 |
super.ifgt(lbl); |
1178 |
super.ifgt(lbl); |
958 |
this.currentFrame.numberOfStackItems--; |
1179 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1180 |
this.currentFrame.numberOfStackItems--; |
1181 |
} |
959 |
} |
1182 |
} |
960 |
public void ifle(BranchLabel lbl) { |
1183 |
public void ifle(BranchLabel lbl) { |
961 |
super.ifle(lbl); |
1184 |
super.ifle(lbl); |
962 |
this.currentFrame.numberOfStackItems--; |
1185 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1186 |
this.currentFrame.numberOfStackItems--; |
1187 |
} |
963 |
} |
1188 |
} |
964 |
public void iflt(BranchLabel lbl) { |
1189 |
public void iflt(BranchLabel lbl) { |
965 |
super.iflt(lbl); |
1190 |
super.iflt(lbl); |
966 |
this.currentFrame.numberOfStackItems--; |
1191 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1192 |
this.currentFrame.numberOfStackItems--; |
1193 |
} |
967 |
} |
1194 |
} |
968 |
public void ifne(BranchLabel lbl) { |
1195 |
public void ifne(BranchLabel lbl) { |
969 |
super.ifne(lbl); |
1196 |
super.ifne(lbl); |
970 |
this.currentFrame.numberOfStackItems--; |
1197 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1198 |
this.currentFrame.numberOfStackItems--; |
1199 |
} |
971 |
} |
1200 |
} |
972 |
public void ifnonnull(BranchLabel lbl) { |
1201 |
public void ifnonnull(BranchLabel lbl) { |
973 |
super.ifnonnull(lbl); |
1202 |
super.ifnonnull(lbl); |
974 |
this.currentFrame.numberOfStackItems--; |
1203 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1204 |
this.currentFrame.numberOfStackItems--; |
1205 |
} |
975 |
} |
1206 |
} |
976 |
public void ifnull(BranchLabel lbl) { |
1207 |
public void ifnull(BranchLabel lbl) { |
977 |
super.ifnull(lbl); |
1208 |
super.ifnull(lbl); |
978 |
this.currentFrame.numberOfStackItems--; |
1209 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1210 |
this.currentFrame.numberOfStackItems--; |
1211 |
} |
979 |
} |
1212 |
} |
980 |
public void iload(int iArg) { |
1213 |
public void iload(int iArg) { |
981 |
super.iload(iArg); |
1214 |
super.iload(iArg); |
982 |
this.currentFrame.addStackItem(getLocal(iArg, this.currentFrame)); |
1215 |
this.currentFrame.addStackItem(getLocal(iArg, this.currentFrame)); |
983 |
} |
1216 |
} |
984 |
public void iload_0() { |
1217 |
public void iload_0() { |
985 |
super.iload_0(); |
1218 |
super.iload_0(); |
986 |
this.currentFrame.addStackItem(getLocal(0, this.currentFrame)); |
1219 |
this.currentFrame.addStackItem(getLocal(0, this.currentFrame)); |
987 |
} |
1220 |
} |
988 |
public void iload_1() { |
1221 |
public void iload_1() { |
989 |
super.iload_1(); |
1222 |
super.iload_1(); |
990 |
this.currentFrame.addStackItem(getLocal(1, this.currentFrame)); |
1223 |
this.currentFrame.addStackItem(getLocal(1, this.currentFrame)); |
991 |
} |
1224 |
} |
992 |
public void iload_2() { |
1225 |
public void iload_2() { |
993 |
super.iload_2(); |
1226 |
super.iload_2(); |
994 |
this.currentFrame.addStackItem(getLocal(2, this.currentFrame)); |
1227 |
this.currentFrame.addStackItem(getLocal(2, this.currentFrame)); |
995 |
} |
1228 |
} |
996 |
public void iload_3() { |
1229 |
public void iload_3() { |
997 |
super.iload_3(); |
1230 |
super.iload_3(); |
998 |
this.currentFrame.addStackItem(getLocal(3, this.currentFrame)); |
1231 |
this.currentFrame.addStackItem(getLocal(3, this.currentFrame)); |
999 |
} |
1232 |
} |
1000 |
public void imul() { |
1233 |
public void imul() { |
1001 |
super.imul(); |
1234 |
super.imul(); |
1002 |
this.currentFrame.numberOfStackItems--; |
1235 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1236 |
this.currentFrame.numberOfStackItems--; |
1237 |
} |
1003 |
} |
1238 |
} |
1004 |
public boolean inlineForwardReferencesFromLabelsTargeting(BranchLabel targetLabel, int gotoLocation) { |
1239 |
public boolean inlineForwardReferencesFromLabelsTargeting(BranchLabel targetLabel, int gotoLocation) { |
1005 |
if (targetLabel.delegate != null) return false; // already inlined |
1240 |
if (targetLabel.delegate != null) return false; // already inlined |
1006 |
int chaining = L_UNKNOWN; |
1241 |
int chaining = L_UNKNOWN; |
1007 |
|
1242 |
|
1008 |
boolean removeFrame = true; |
1243 |
boolean removeFrame = true; |
1009 |
for (int i = this.countLabels - 1; i >= 0; i--) { |
1244 |
for (int i = this.countLabels - 1; i >= 0; i--) { |
1010 |
BranchLabel currentLabel = labels[i]; |
1245 |
BranchLabel currentLabel = labels[i]; |
1011 |
if (currentLabel.position != gotoLocation) break; |
1246 |
if (currentLabel.position != gotoLocation) break; |
1012 |
if (currentLabel == targetLabel) { |
1247 |
if (currentLabel == targetLabel) { |
1013 |
chaining |= L_CANNOT_OPTIMIZE; |
1248 |
chaining |= L_CANNOT_OPTIMIZE; |
1014 |
continue; |
1249 |
continue; |
1015 |
} |
1250 |
} |
1016 |
if (currentLabel.isStandardLabel()) { |
1251 |
if (currentLabel.isStandardLabel()) { |
1017 |
if (currentLabel.delegate != null) continue; |
1252 |
if (currentLabel.delegate != null) continue; |
1018 |
chaining |= L_OPTIMIZABLE; |
1253 |
chaining |= L_OPTIMIZABLE; |
1019 |
if (currentLabel.forwardReferenceCount() == 0 && ((currentLabel.tagBits & BranchLabel.USED) != 0)) { |
1254 |
if (currentLabel.forwardReferenceCount() == 0 && ((currentLabel.tagBits & BranchLabel.USED) != 0)) { |
1020 |
removeFrame = false; |
1255 |
removeFrame = false; |
1021 |
} |
1256 |
} |
1022 |
continue; |
1257 |
continue; |
1023 |
} |
1258 |
} |
1024 |
// case label |
1259 |
// case label |
1025 |
removeFrame = false; |
1260 |
removeFrame = false; |
1026 |
chaining |= L_CANNOT_OPTIMIZE; |
1261 |
chaining |= L_CANNOT_OPTIMIZE; |
1027 |
} |
1262 |
} |
1028 |
if ((chaining & L_OPTIMIZABLE) != 0) { |
1263 |
if ((chaining & L_OPTIMIZABLE) != 0) { |
1029 |
for (int i = this.countLabels - 1; i >= 0; i--) { |
1264 |
for (int i = this.countLabels - 1; i >= 0; i--) { |
1030 |
BranchLabel currentLabel = labels[i]; |
1265 |
BranchLabel currentLabel = labels[i]; |
1031 |
if (currentLabel.position != gotoLocation) break; |
1266 |
if (currentLabel.position != gotoLocation) break; |
1032 |
if (currentLabel == targetLabel) continue; |
1267 |
if (currentLabel == targetLabel) continue; |
1033 |
if (currentLabel.isStandardLabel()) { |
1268 |
if (currentLabel.isStandardLabel()) { |
1034 |
if (currentLabel.delegate != null) continue; |
1269 |
if (currentLabel.delegate != null) continue; |
1035 |
targetLabel.becomeDelegateFor(currentLabel); |
1270 |
targetLabel.becomeDelegateFor(currentLabel); |
1036 |
// we should remove the frame corresponding to otherLabel position in order to prevent unused stack frame |
1271 |
// we should remove the frame corresponding to otherLabel position in order to prevent unused stack frame |
1037 |
if (removeFrame) { |
1272 |
if (removeFrame) { |
1038 |
currentLabel.tagBits &= ~BranchLabel.USED; |
1273 |
currentLabel.tagBits &= ~BranchLabel.USED; |
1039 |
this.removeStackFrameFor(gotoLocation); |
1274 |
this.removeStackFrameFor(gotoLocation); |
1040 |
} |
1275 |
} |
1041 |
} |
1276 |
} |
1042 |
} |
1277 |
} |
1043 |
} |
1278 |
} |
1044 |
return (chaining & (L_OPTIMIZABLE|L_CANNOT_OPTIMIZE)) == L_OPTIMIZABLE; // check was some standards, and no case/recursive |
1279 |
return (chaining & (L_OPTIMIZABLE|L_CANNOT_OPTIMIZE)) == L_OPTIMIZABLE; // check was some standards, and no case/recursive |
1045 |
} |
1280 |
} |
1046 |
|
1281 |
|
1047 |
public void init(ClassFile targetClassFile) { |
1282 |
public void init(ClassFile targetClassFile) { |
1048 |
super.init(targetClassFile); |
1283 |
super.init(targetClassFile); |
1049 |
this.frames = null; |
1284 |
this.frames = null; |
1050 |
this.currentFrame = null; |
1285 |
this.currentFrame = null; |
1051 |
} |
1286 |
} |
1052 |
public void initializeMaxLocals(MethodBinding methodBinding) { |
1287 |
public void initializeMaxLocals(MethodBinding methodBinding) { |
1053 |
super.initializeMaxLocals(methodBinding); |
1288 |
super.initializeMaxLocals(methodBinding); |
1054 |
StackMapFrame frame = new StackMapFrame(); |
1289 |
StackMapFrame frame = new StackMapFrame(); |
1055 |
frame.pc = -1; |
1290 |
frame.pc = -1; |
1056 |
|
1291 |
|
1057 |
if (this.maxLocals != 0) { |
1292 |
if (this.maxLocals != 0) { |
1058 |
int resolvedPosition = 0; |
1293 |
int resolvedPosition = 0; |
1059 |
// take into account enum constructor synthetic name+ordinal |
1294 |
// take into account enum constructor synthetic name+ordinal |
1060 |
final boolean isConstructor = methodBinding.isConstructor(); |
1295 |
final boolean isConstructor = methodBinding.isConstructor(); |
1061 |
if (isConstructor) { |
1296 |
if (isConstructor) { |
1062 |
frame.putLocal(resolvedPosition, new VerificationTypeInfo(VerificationTypeInfo.ITEM_UNINITIALIZED_THIS, methodBinding.declaringClass)); |
1297 |
frame.putLocal(resolvedPosition, new VerificationTypeInfo(VerificationTypeInfo.ITEM_UNINITIALIZED_THIS, methodBinding.declaringClass)); |
1063 |
resolvedPosition++; |
1298 |
resolvedPosition++; |
1064 |
} else if (!methodBinding.isStatic()) { |
1299 |
} else if (!methodBinding.isStatic()) { |
1065 |
frame.putLocal(resolvedPosition, new VerificationTypeInfo(VerificationTypeInfo.ITEM_OBJECT, methodBinding.declaringClass)); |
1300 |
frame.putLocal(resolvedPosition, new VerificationTypeInfo(VerificationTypeInfo.ITEM_OBJECT, methodBinding.declaringClass)); |
1066 |
resolvedPosition++; |
1301 |
resolvedPosition++; |
1067 |
} |
1302 |
} |
1068 |
|
1303 |
|
1069 |
if (isConstructor) { |
1304 |
if (isConstructor) { |
1070 |
if (methodBinding.declaringClass.isEnum()) { |
1305 |
if (methodBinding.declaringClass.isEnum()) { |
1071 |
frame.putLocal(resolvedPosition, new VerificationTypeInfo(TypeIds.T_JavaLangString, ConstantPool.JavaLangStringConstantPoolName)); |
1306 |
frame.putLocal(resolvedPosition, new VerificationTypeInfo(TypeIds.T_JavaLangString, ConstantPool.JavaLangStringConstantPoolName)); |
1072 |
resolvedPosition++; |
1307 |
resolvedPosition++; |
1073 |
frame.putLocal(resolvedPosition, new VerificationTypeInfo(TypeBinding.INT)); |
1308 |
frame.putLocal(resolvedPosition, new VerificationTypeInfo(TypeBinding.INT)); |
1074 |
resolvedPosition++; |
1309 |
resolvedPosition++; |
1075 |
} |
1310 |
} |
1076 |
|
1311 |
|
1077 |
// take into account the synthetic parameters |
1312 |
// take into account the synthetic parameters |
1078 |
if (methodBinding.declaringClass.isNestedType()) { |
1313 |
if (methodBinding.declaringClass.isNestedType()) { |
1079 |
ReferenceBinding enclosingInstanceTypes[]; |
1314 |
ReferenceBinding enclosingInstanceTypes[]; |
1080 |
if ((enclosingInstanceTypes = methodBinding.declaringClass.syntheticEnclosingInstanceTypes()) != null) { |
1315 |
if ((enclosingInstanceTypes = methodBinding.declaringClass.syntheticEnclosingInstanceTypes()) != null) { |
1081 |
for (int i = 0, max = enclosingInstanceTypes.length; i < max; i++) { |
1316 |
for (int i = 0, max = enclosingInstanceTypes.length; i < max; i++) { |
1082 |
// an enclosingInstanceType can only be a reference binding. It cannot be |
1317 |
// an enclosingInstanceType can only be a reference binding. It cannot be |
1083 |
// LongBinding or DoubleBinding |
1318 |
// LongBinding or DoubleBinding |
1084 |
frame.putLocal(resolvedPosition, new VerificationTypeInfo(enclosingInstanceTypes[i])); |
1319 |
frame.putLocal(resolvedPosition, new VerificationTypeInfo(enclosingInstanceTypes[i])); |
1085 |
resolvedPosition++; |
1320 |
resolvedPosition++; |
1086 |
} |
1321 |
} |
1087 |
} |
1322 |
} |
1088 |
|
1323 |
|
1089 |
TypeBinding[] arguments; |
1324 |
TypeBinding[] arguments; |
1090 |
if ((arguments = methodBinding.parameters) != null) { |
1325 |
if ((arguments = methodBinding.parameters) != null) { |
1091 |
for (int i = 0, max = arguments.length; i < max; i++) { |
1326 |
for (int i = 0, max = arguments.length; i < max; i++) { |
1092 |
final TypeBinding typeBinding = arguments[i]; |
1327 |
final TypeBinding typeBinding = arguments[i]; |
1093 |
frame.putLocal(resolvedPosition, new VerificationTypeInfo(typeBinding)); |
1328 |
frame.putLocal(resolvedPosition, new VerificationTypeInfo(typeBinding)); |
1094 |
switch(typeBinding.id) { |
1329 |
switch(typeBinding.id) { |
1095 |
case TypeIds.T_double : |
1330 |
case TypeIds.T_double : |
1096 |
case TypeIds.T_long : |
1331 |
case TypeIds.T_long : |
1097 |
resolvedPosition += 2; |
1332 |
resolvedPosition += 2; |
1098 |
break; |
1333 |
break; |
1099 |
default: |
1334 |
default: |
1100 |
resolvedPosition++; |
1335 |
resolvedPosition++; |
1101 |
} |
1336 |
} |
1102 |
} |
1337 |
} |
1103 |
} |
1338 |
} |
1104 |
|
1339 |
|
1105 |
SyntheticArgumentBinding syntheticArguments[]; |
1340 |
SyntheticArgumentBinding syntheticArguments[]; |
1106 |
if ((syntheticArguments = methodBinding.declaringClass.syntheticOuterLocalVariables()) != null) { |
1341 |
if ((syntheticArguments = methodBinding.declaringClass.syntheticOuterLocalVariables()) != null) { |
1107 |
for (int i = 0, max = syntheticArguments.length; i < max; i++) { |
1342 |
for (int i = 0, max = syntheticArguments.length; i < max; i++) { |
1108 |
final TypeBinding typeBinding = syntheticArguments[i].type; |
1343 |
final TypeBinding typeBinding = syntheticArguments[i].type; |
1109 |
frame.putLocal(resolvedPosition, new VerificationTypeInfo(typeBinding)); |
1344 |
frame.putLocal(resolvedPosition, new VerificationTypeInfo(typeBinding)); |
1110 |
switch(typeBinding.id) { |
1345 |
switch(typeBinding.id) { |
1111 |
case TypeIds.T_double : |
1346 |
case TypeIds.T_double : |
1112 |
case TypeIds.T_long : |
1347 |
case TypeIds.T_long : |
1113 |
resolvedPosition+=2; |
1348 |
resolvedPosition+=2; |
1114 |
break; |
1349 |
break; |
1115 |
default: |
1350 |
default: |
1116 |
resolvedPosition++; |
1351 |
resolvedPosition++; |
1117 |
} |
1352 |
} |
1118 |
} |
1353 |
} |
1119 |
} |
1354 |
} |
1120 |
} else { |
1355 |
} else { |
1121 |
TypeBinding[] arguments; |
1356 |
TypeBinding[] arguments; |
1122 |
if ((arguments = methodBinding.parameters) != null) { |
1357 |
if ((arguments = methodBinding.parameters) != null) { |
1123 |
for (int i = 0, max = arguments.length; i < max; i++) { |
1358 |
for (int i = 0, max = arguments.length; i < max; i++) { |
1124 |
final TypeBinding typeBinding = arguments[i]; |
1359 |
final TypeBinding typeBinding = arguments[i]; |
1125 |
frame.putLocal(resolvedPosition, new VerificationTypeInfo(typeBinding)); |
1360 |
frame.putLocal(resolvedPosition, new VerificationTypeInfo(typeBinding)); |
1126 |
switch(typeBinding.id) { |
1361 |
switch(typeBinding.id) { |
1127 |
case TypeIds.T_double : |
1362 |
case TypeIds.T_double : |
1128 |
case TypeIds.T_long : |
1363 |
case TypeIds.T_long : |
1129 |
resolvedPosition += 2; |
1364 |
resolvedPosition += 2; |
1130 |
break; |
1365 |
break; |
1131 |
default: |
1366 |
default: |
1132 |
resolvedPosition++; |
1367 |
resolvedPosition++; |
1133 |
} |
1368 |
} |
1134 |
} |
1369 |
} |
1135 |
} |
1370 |
} |
1136 |
} |
1371 |
} |
1137 |
} else { |
1372 |
} else { |
1138 |
TypeBinding[] arguments; |
1373 |
TypeBinding[] arguments; |
1139 |
if ((arguments = methodBinding.parameters) != null) { |
1374 |
if ((arguments = methodBinding.parameters) != null) { |
1140 |
for (int i = 0, max = arguments.length; i < max; i++) { |
1375 |
for (int i = 0, max = arguments.length; i < max; i++) { |
1141 |
final TypeBinding typeBinding = arguments[i]; |
1376 |
final TypeBinding typeBinding = arguments[i]; |
1142 |
frame.putLocal(resolvedPosition, new VerificationTypeInfo(typeBinding)); |
1377 |
frame.putLocal(resolvedPosition, new VerificationTypeInfo(typeBinding)); |
1143 |
switch(typeBinding.id) { |
1378 |
switch(typeBinding.id) { |
1144 |
case TypeIds.T_double : |
1379 |
case TypeIds.T_double : |
1145 |
case TypeIds.T_long : |
1380 |
case TypeIds.T_long : |
1146 |
resolvedPosition += 2; |
1381 |
resolvedPosition += 2; |
1147 |
break; |
1382 |
break; |
1148 |
default: |
1383 |
default: |
1149 |
resolvedPosition++; |
1384 |
resolvedPosition++; |
1150 |
} |
1385 |
} |
1151 |
} |
1386 |
} |
1152 |
} |
1387 |
} |
1153 |
} |
1388 |
} |
1154 |
} |
1389 |
} |
1155 |
try { |
1390 |
try { |
1156 |
this.frames = new ArrayList(); |
1391 |
this.frames = new ArrayList(); |
1157 |
this.frames.add(frame.clone()); |
1392 |
this.frames.add(frame.clone()); |
1158 |
} catch (CloneNotSupportedException e) { |
1393 |
} catch (CloneNotSupportedException e) { |
1159 |
e.printStackTrace(); |
1394 |
e.printStackTrace(); |
1160 |
} |
1395 |
} |
1161 |
this.currentFrame = frame; |
1396 |
this.currentFrame = frame; |
1162 |
this.framePositions = new HashSet(); |
1397 |
this.framePositions = new HashSet(); |
1163 |
this.variablesModificationsPositions = new ArrayList(); |
1398 |
this.variablesModificationsPositions = new ArrayList(); |
1164 |
} |
1399 |
} |
1165 |
public void instance_of(TypeBinding typeBinding) { |
1400 |
public void instance_of(TypeBinding typeBinding) { |
1166 |
super.instance_of(typeBinding); |
1401 |
super.instance_of(typeBinding); |
1167 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.INT); |
1402 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
1403 |
if (numberOfStackItems >= 1) { |
1404 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.INT); |
1405 |
} |
1168 |
} |
1406 |
} |
1169 |
protected void invokeAccessibleObjectSetAccessible() { |
1407 |
protected void invokeAccessibleObjectSetAccessible() { |
1170 |
super.invokeAccessibleObjectSetAccessible(); |
1408 |
super.invokeAccessibleObjectSetAccessible(); |
1171 |
this.currentFrame.numberOfStackItems-=2; |
1409 |
if (this.currentFrame.numberOfStackItems >= 2) { |
|
|
1410 |
this.currentFrame.numberOfStackItems-=2; |
1411 |
} |
1172 |
} |
1412 |
} |
1173 |
protected void invokeArrayNewInstance() { |
1413 |
protected void invokeArrayNewInstance() { |
1174 |
super.invokeArrayNewInstance(); |
1414 |
super.invokeArrayNewInstance(); |
1175 |
this.currentFrame.numberOfStackItems--; |
1415 |
if (this.currentFrame.numberOfStackItems >= 2) { |
1176 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeIds.T_JavaLangObject, ConstantPool.JavaLangObjectConstantPoolName); |
1416 |
this.currentFrame.numberOfStackItems--; |
|
|
1417 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeIds.T_JavaLangObject, ConstantPool.JavaLangObjectConstantPoolName); |
1418 |
} |
1177 |
} |
1419 |
} |
1178 |
public void invokeClassForName() { |
1420 |
public void invokeClassForName() { |
1179 |
super.invokeClassForName(); |
1421 |
super.invokeClassForName(); |
1180 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeIds.T_JavaLangClass, ConstantPool.JavaLangClassConstantPoolName); |
1422 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
1423 |
if (numberOfStackItems >= 1) { |
1424 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeIds.T_JavaLangClass, ConstantPool.JavaLangClassConstantPoolName); |
1425 |
} |
1181 |
} |
1426 |
} |
1182 |
protected void invokeClassGetDeclaredConstructor() { |
1427 |
protected void invokeClassGetDeclaredConstructor() { |
1183 |
super.invokeClassGetDeclaredConstructor(); |
1428 |
super.invokeClassGetDeclaredConstructor(); |
1184 |
this.currentFrame.numberOfStackItems--; |
1429 |
if (this.currentFrame.numberOfStackItems >= 2) { |
1185 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeIds.T_JavaLangReflectConstructor, ConstantPool.JavaLangReflectConstructorConstantPoolName); |
1430 |
this.currentFrame.numberOfStackItems--; |
|
|
1431 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeIds.T_JavaLangReflectConstructor, ConstantPool.JavaLangReflectConstructorConstantPoolName); |
1432 |
} |
1186 |
} |
1433 |
} |
1187 |
protected void invokeClassGetDeclaredField() { |
1434 |
protected void invokeClassGetDeclaredField() { |
1188 |
super.invokeClassGetDeclaredField(); |
1435 |
super.invokeClassGetDeclaredField(); |
1189 |
this.currentFrame.numberOfStackItems--; |
1436 |
if (this.currentFrame.numberOfStackItems >= 2) { |
1190 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeIds.T_JavaLangReflectField, ConstantPool.JAVALANGREFLECTFIELD_CONSTANTPOOLNAME); |
1437 |
this.currentFrame.numberOfStackItems--; |
|
|
1438 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeIds.T_JavaLangReflectField, ConstantPool.JAVALANGREFLECTFIELD_CONSTANTPOOLNAME); |
1439 |
} |
1191 |
} |
1440 |
} |
1192 |
protected void invokeClassGetDeclaredMethod() { |
1441 |
protected void invokeClassGetDeclaredMethod() { |
1193 |
super.invokeClassGetDeclaredMethod(); |
1442 |
super.invokeClassGetDeclaredMethod(); |
1194 |
this.currentFrame.numberOfStackItems-=2; |
1443 |
if (this.currentFrame.numberOfStackItems >= 3) { |
1195 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeIds.T_JavaLangReflectMethod, ConstantPool.JAVALANGREFLECTMETHOD_CONSTANTPOOLNAME); |
1444 |
this.currentFrame.numberOfStackItems-=2; |
|
|
1445 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeIds.T_JavaLangReflectMethod, ConstantPool.JAVALANGREFLECTMETHOD_CONSTANTPOOLNAME); |
1446 |
} |
1196 |
} |
1447 |
} |
1197 |
public void invokeEnumOrdinal(char[] enumTypeConstantPoolName) { |
1448 |
public void invokeEnumOrdinal(char[] enumTypeConstantPoolName) { |
1198 |
super.invokeEnumOrdinal(enumTypeConstantPoolName); |
1449 |
super.invokeEnumOrdinal(enumTypeConstantPoolName); |
1199 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.INT); |
1450 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
1451 |
if (numberOfStackItems >= 1) { |
1452 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.INT); |
1453 |
} |
1200 |
} |
1454 |
} |
1201 |
public void invokeinterface(MethodBinding methodBinding) { |
1455 |
public void invokeinterface(MethodBinding methodBinding) { |
1202 |
super.invokeinterface(methodBinding); |
1456 |
super.invokeinterface(methodBinding); |
1203 |
int argCount = 1; |
1457 |
int argCount = 1; |
1204 |
argCount += methodBinding.parameters.length; |
1458 |
argCount += methodBinding.parameters.length; |
1205 |
this.currentFrame.numberOfStackItems -= argCount; |
1459 |
if (this.currentFrame.numberOfStackItems >= argCount) { |
1206 |
if (methodBinding.returnType != TypeBinding.VOID) { |
1460 |
this.currentFrame.numberOfStackItems -= argCount; |
1207 |
this.currentFrame.addStackItem(methodBinding.returnType); |
1461 |
} |
1208 |
} |
1462 |
if (methodBinding.returnType != TypeBinding.VOID) { |
|
|
1463 |
this.currentFrame.addStackItem(methodBinding.returnType); |
1464 |
} |
1209 |
} |
1465 |
} |
1210 |
public void invokeJavaLangAssertionErrorConstructor(int typeBindingID) { |
1466 |
public void invokeJavaLangAssertionErrorConstructor(int typeBindingID) { |
1211 |
// invokespecial: java.lang.AssertionError.<init>(typeBindingID)V |
1467 |
// invokespecial: java.lang.AssertionError.<init>(typeBindingID)V |
1212 |
super.invokeJavaLangAssertionErrorConstructor(typeBindingID); |
1468 |
super.invokeJavaLangAssertionErrorConstructor(typeBindingID); |
1213 |
this.currentFrame.numberOfStackItems--; |
1469 |
if (this.currentFrame.numberOfStackItems >= 2) { |
1214 |
this.currentFrame.initializeReceiver(); |
1470 |
this.currentFrame.numberOfStackItems--; |
1215 |
this.currentFrame.numberOfStackItems--; // remove the top of stack |
1471 |
this.currentFrame.initializeReceiver(); |
|
|
1472 |
this.currentFrame.numberOfStackItems--; // remove the top of stack |
1473 |
} |
1216 |
} |
1474 |
} |
1217 |
public void invokeJavaLangAssertionErrorDefaultConstructor() { |
1475 |
public void invokeJavaLangAssertionErrorDefaultConstructor() { |
1218 |
super.invokeJavaLangAssertionErrorDefaultConstructor(); |
1476 |
super.invokeJavaLangAssertionErrorDefaultConstructor(); |
1219 |
this.currentFrame.initializeReceiver(); |
1477 |
if (this.currentFrame.numberOfStackItems >= 1) { |
1220 |
this.currentFrame.numberOfStackItems--; // remove the top of stack |
1478 |
this.currentFrame.initializeReceiver(); |
|
|
1479 |
this.currentFrame.numberOfStackItems--; // remove the top of stack |
1480 |
} |
1221 |
} |
1481 |
} |
1222 |
public void invokeJavaLangClassDesiredAssertionStatus() { |
1482 |
public void invokeJavaLangClassDesiredAssertionStatus() { |
1223 |
// invokevirtual: java.lang.Class.desiredAssertionStatus()Z; |
1483 |
// invokevirtual: java.lang.Class.desiredAssertionStatus()Z; |
1224 |
super.invokeJavaLangClassDesiredAssertionStatus(); |
1484 |
super.invokeJavaLangClassDesiredAssertionStatus(); |
1225 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.BOOLEAN); |
1485 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
1486 |
if (numberOfStackItems >= 1) { |
1487 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.BOOLEAN); |
1488 |
} |
1226 |
} |
1489 |
} |
1227 |
public void invokeJavaLangEnumvalueOf(ReferenceBinding binding) { |
1490 |
public void invokeJavaLangEnumvalueOf(ReferenceBinding binding) { |
1228 |
// invokestatic: java.lang.Enum.valueOf(Class,String) |
1491 |
// invokestatic: java.lang.Enum.valueOf(Class,String) |
1229 |
super.invokeJavaLangEnumvalueOf(binding); |
1492 |
super.invokeJavaLangEnumvalueOf(binding); |
1230 |
this.currentFrame.numberOfStackItems -= 2; |
1493 |
if (this.currentFrame.numberOfStackItems >= 2) { |
1231 |
this.currentFrame.addStackItem(binding); |
1494 |
this.currentFrame.numberOfStackItems -= 2; |
|
|
1495 |
this.currentFrame.addStackItem(binding); |
1496 |
} |
1232 |
} |
1497 |
} |
1233 |
public void invokeJavaLangEnumValues(TypeBinding enumBinding, ArrayBinding arrayBinding) { |
1498 |
public void invokeJavaLangEnumValues(TypeBinding enumBinding, ArrayBinding arrayBinding) { |
1234 |
super.invokeJavaLangEnumValues(enumBinding, arrayBinding); |
1499 |
super.invokeJavaLangEnumValues(enumBinding, arrayBinding); |
1235 |
this.currentFrame.addStackItem(arrayBinding); |
1500 |
this.currentFrame.addStackItem(arrayBinding); |
1236 |
} |
1501 |
} |
1237 |
public void invokeJavaLangErrorConstructor() { |
1502 |
public void invokeJavaLangErrorConstructor() { |
1238 |
super.invokeJavaLangErrorConstructor(); |
1503 |
super.invokeJavaLangErrorConstructor(); |
1239 |
this.currentFrame.numberOfStackItems --; |
1504 |
if (this.currentFrame.numberOfStackItems >= 2) { |
1240 |
this.currentFrame.initializeReceiver(); |
1505 |
this.currentFrame.numberOfStackItems --; |
1241 |
this.currentFrame.numberOfStackItems--; // remove the top of stack |
1506 |
this.currentFrame.initializeReceiver(); |
|
|
1507 |
this.currentFrame.numberOfStackItems--; // remove the top of stack |
1508 |
} |
1242 |
} |
1509 |
} |
1243 |
public void invokeJavaLangReflectConstructorNewInstance() { |
1510 |
public void invokeJavaLangReflectConstructorNewInstance() { |
1244 |
super.invokeJavaLangReflectConstructorNewInstance(); |
1511 |
super.invokeJavaLangReflectConstructorNewInstance(); |
1245 |
this.currentFrame.numberOfStackItems--; |
1512 |
if (this.currentFrame.numberOfStackItems >= 2) { |
1246 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeIds.T_JavaLangObject, ConstantPool.JavaLangObjectConstantPoolName); |
1513 |
this.currentFrame.numberOfStackItems--; |
|
|
1514 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeIds.T_JavaLangObject, ConstantPool.JavaLangObjectConstantPoolName); |
1515 |
} |
1247 |
} |
1516 |
} |
1248 |
protected void invokeJavaLangReflectFieldGetter(int typeID) { |
1517 |
protected void invokeJavaLangReflectFieldGetter(int typeID) { |
1249 |
super.invokeJavaLangReflectFieldGetter(typeID); |
1518 |
super.invokeJavaLangReflectFieldGetter(typeID); |
1250 |
VerificationTypeInfo info = null; |
1519 |
VerificationTypeInfo info = null; |
1251 |
switch (typeID) { |
1520 |
switch (typeID) { |
1252 |
case TypeIds.T_int : |
1521 |
case TypeIds.T_int : |
1253 |
info = new VerificationTypeInfo(TypeBinding.INT); |
1522 |
info = new VerificationTypeInfo(TypeBinding.INT); |
1254 |
break; |
1523 |
break; |
1255 |
case TypeIds.T_byte : |
1524 |
case TypeIds.T_byte : |
1256 |
info = new VerificationTypeInfo(TypeBinding.BYTE); |
1525 |
info = new VerificationTypeInfo(TypeBinding.BYTE); |
1257 |
break; |
1526 |
break; |
1258 |
case TypeIds.T_short : |
1527 |
case TypeIds.T_short : |
1259 |
info = new VerificationTypeInfo(TypeBinding.SHORT); |
1528 |
info = new VerificationTypeInfo(TypeBinding.SHORT); |
1260 |
break; |
1529 |
break; |
1261 |
case TypeIds.T_long : |
1530 |
case TypeIds.T_long : |
1262 |
info = new VerificationTypeInfo(TypeBinding.LONG); |
1531 |
info = new VerificationTypeInfo(TypeBinding.LONG); |
1263 |
break; |
1532 |
break; |
1264 |
case TypeIds.T_float : |
1533 |
case TypeIds.T_float : |
1265 |
info = new VerificationTypeInfo(TypeBinding.FLOAT); |
1534 |
info = new VerificationTypeInfo(TypeBinding.FLOAT); |
1266 |
break; |
1535 |
break; |
1267 |
case TypeIds.T_double : |
1536 |
case TypeIds.T_double : |
1268 |
info = new VerificationTypeInfo(TypeBinding.DOUBLE); |
1537 |
info = new VerificationTypeInfo(TypeBinding.DOUBLE); |
1269 |
break; |
1538 |
break; |
1270 |
case TypeIds.T_char : |
1539 |
case TypeIds.T_char : |
1271 |
info = new VerificationTypeInfo(TypeBinding.CHAR); |
1540 |
info = new VerificationTypeInfo(TypeBinding.CHAR); |
1272 |
break; |
1541 |
break; |
1273 |
case TypeIds.T_boolean : |
1542 |
case TypeIds.T_boolean : |
1274 |
info = new VerificationTypeInfo(TypeBinding.BOOLEAN); |
1543 |
info = new VerificationTypeInfo(TypeBinding.BOOLEAN); |
1275 |
break; |
1544 |
break; |
1276 |
default : |
1545 |
default : |
1277 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangObject, ConstantPool.JavaLangObjectConstantPoolName); |
1546 |
info = new VerificationTypeInfo(TypeIds.T_JavaLangObject, ConstantPool.JavaLangObjectConstantPoolName); |
1278 |
break; |
1547 |
break; |
1279 |
} |
1548 |
} |
1280 |
this.currentFrame.numberOfStackItems--; |
1549 |
if (this.currentFrame.numberOfStackItems >= 2) { |
1281 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = info; |
1550 |
this.currentFrame.numberOfStackItems--; |
|
|
1551 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = info; |
1552 |
} |
1282 |
} |
1553 |
} |
1283 |
protected void invokeJavaLangReflectFieldSetter(int typeID) { |
1554 |
protected void invokeJavaLangReflectFieldSetter(int typeID) { |
1284 |
super.invokeJavaLangReflectFieldSetter(typeID); |
1555 |
super.invokeJavaLangReflectFieldSetter(typeID); |
1285 |
this.currentFrame.numberOfStackItems -= 2; |
1556 |
if (this.currentFrame.numberOfStackItems >= 2) { |
|
|
1557 |
this.currentFrame.numberOfStackItems -= 2; |
1558 |
} |
1286 |
} |
1559 |
} |
1287 |
public void invokeJavaLangReflectMethodInvoke() { |
1560 |
public void invokeJavaLangReflectMethodInvoke() { |
1288 |
super.invokeJavaLangReflectMethodInvoke(); |
1561 |
super.invokeJavaLangReflectMethodInvoke(); |
1289 |
this.currentFrame.numberOfStackItems -= 3; |
1562 |
if (this.currentFrame.numberOfStackItems >= 3) { |
|
|
1563 |
this.currentFrame.numberOfStackItems -= 3; |
1564 |
} |
1290 |
} |
1565 |
} |
1291 |
public void invokeJavaUtilIteratorHasNext() { |
1566 |
public void invokeJavaUtilIteratorHasNext() { |
1292 |
super.invokeJavaUtilIteratorHasNext(); |
1567 |
super.invokeJavaUtilIteratorHasNext(); |
1293 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.BOOLEAN); |
1568 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
1569 |
if (numberOfStackItems >= 1) { |
1570 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.BOOLEAN); |
1571 |
} |
1294 |
} |
1572 |
} |
1295 |
public void invokeJavaUtilIteratorNext() { |
1573 |
public void invokeJavaUtilIteratorNext() { |
1296 |
// invokeinterface java.util.Iterator.next()java.lang.Object |
1574 |
// invokeinterface java.util.Iterator.next()java.lang.Object |
1297 |
super.invokeJavaUtilIteratorNext(); |
1575 |
super.invokeJavaUtilIteratorNext(); |
1298 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeIds.T_JavaLangObject, ConstantPool.JavaLangObjectConstantPoolName); |
1576 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
1577 |
if (numberOfStackItems >= 1) { |
1578 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeIds.T_JavaLangObject, ConstantPool.JavaLangObjectConstantPoolName); |
1579 |
} |
1299 |
} |
1580 |
} |
1300 |
public void invokeNoClassDefFoundErrorStringConstructor() { |
1581 |
public void invokeNoClassDefFoundErrorStringConstructor() { |
1301 |
super.invokeNoClassDefFoundErrorStringConstructor(); |
1582 |
super.invokeNoClassDefFoundErrorStringConstructor(); |
1302 |
this.currentFrame.numberOfStackItems --; |
1583 |
if (this.currentFrame.numberOfStackItems >= 2) { |
1303 |
this.currentFrame.initializeReceiver(); |
1584 |
this.currentFrame.numberOfStackItems --; |
1304 |
this.currentFrame.numberOfStackItems--; // remove the top of stack |
1585 |
this.currentFrame.initializeReceiver(); |
|
|
1586 |
this.currentFrame.numberOfStackItems--; // remove the top of stack |
1587 |
} |
1305 |
} |
1588 |
} |
1306 |
public void invokeObjectGetClass() { |
1589 |
public void invokeObjectGetClass() { |
1307 |
super.invokeObjectGetClass(); |
1590 |
super.invokeObjectGetClass(); |
1308 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeIds.T_JavaLangClass, ConstantPool.JavaLangClassConstantPoolName); |
1591 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
1592 |
if (numberOfStackItems >= 1) { |
1593 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeIds.T_JavaLangClass, ConstantPool.JavaLangClassConstantPoolName); |
1594 |
} |
1309 |
} |
1595 |
} |
1310 |
public void invokespecial(MethodBinding methodBinding) { |
1596 |
public void invokespecial(MethodBinding methodBinding) { |
1311 |
super.invokespecial(methodBinding); |
1597 |
super.invokespecial(methodBinding); |
1312 |
int argCount = 0; |
1598 |
int argCount = 0; |
1313 |
if (methodBinding.isConstructor()) { |
1599 |
if (methodBinding.isConstructor()) { |
1314 |
final ReferenceBinding declaringClass = methodBinding.declaringClass; |
1600 |
final ReferenceBinding declaringClass = methodBinding.declaringClass; |
1315 |
if (declaringClass.isNestedType()) { |
1601 |
if (declaringClass.isNestedType()) { |
1316 |
// enclosing instances |
1602 |
// enclosing instances |
1317 |
TypeBinding[] syntheticArgumentTypes = declaringClass.syntheticEnclosingInstanceTypes(); |
1603 |
TypeBinding[] syntheticArgumentTypes = declaringClass.syntheticEnclosingInstanceTypes(); |
1318 |
if (syntheticArgumentTypes != null) { |
1604 |
if (syntheticArgumentTypes != null) { |
1319 |
argCount += syntheticArgumentTypes.length; |
1605 |
argCount += syntheticArgumentTypes.length; |
1320 |
} |
1606 |
} |
1321 |
// outer local variables |
1607 |
// outer local variables |
1322 |
SyntheticArgumentBinding[] syntheticArguments = declaringClass.syntheticOuterLocalVariables(); |
1608 |
SyntheticArgumentBinding[] syntheticArguments = declaringClass.syntheticOuterLocalVariables(); |
1323 |
if (syntheticArguments != null) { |
1609 |
if (syntheticArguments != null) { |
1324 |
argCount += syntheticArguments.length; |
1610 |
argCount += syntheticArguments.length; |
1325 |
} |
1611 |
} |
1326 |
} else if (declaringClass.isEnum()) { |
1612 |
} else if (declaringClass.isEnum()) { |
1327 |
argCount += 2; |
1613 |
argCount += 2; |
1328 |
} |
1614 |
} |
1329 |
argCount += methodBinding.parameters.length; |
1615 |
argCount += methodBinding.parameters.length; |
1330 |
this.currentFrame.numberOfStackItems -= argCount; |
1616 |
if (this.currentFrame.numberOfStackItems >= (argCount + 1)) { |
1331 |
this.currentFrame.initializeReceiver(); |
1617 |
this.currentFrame.numberOfStackItems -= argCount; |
1332 |
this.currentFrame.numberOfStackItems--; // remove the top of stack |
1618 |
this.currentFrame.initializeReceiver(); |
1333 |
} else { |
1619 |
this.currentFrame.numberOfStackItems--; // remove the top of stack |
1334 |
argCount = 1; |
1620 |
} |
1335 |
argCount += methodBinding.parameters.length; |
1621 |
} else { |
1336 |
this.currentFrame.numberOfStackItems -= argCount; |
1622 |
argCount = 1; |
1337 |
if (methodBinding.returnType != TypeBinding.VOID) { |
1623 |
argCount += methodBinding.parameters.length; |
1338 |
this.currentFrame.addStackItem(methodBinding.returnType); |
1624 |
if (this.currentFrame.numberOfStackItems >= argCount) { |
1339 |
} |
1625 |
this.currentFrame.numberOfStackItems -= argCount; |
1340 |
} |
1626 |
} |
|
|
1627 |
if (methodBinding.returnType != TypeBinding.VOID) { |
1628 |
this.currentFrame.addStackItem(methodBinding.returnType); |
1629 |
} |
1630 |
} |
1341 |
} |
1631 |
} |
1342 |
public void invokestatic(MethodBinding methodBinding) { |
1632 |
public void invokestatic(MethodBinding methodBinding) { |
1343 |
super.invokestatic(methodBinding); |
1633 |
super.invokestatic(methodBinding); |
1344 |
this.currentFrame.numberOfStackItems -= methodBinding.parameters.length; |
1634 |
int parametersLength = methodBinding.parameters.length; |
1345 |
if (methodBinding.returnType != TypeBinding.VOID) { |
1635 |
if (this.currentFrame.numberOfStackItems >= parametersLength) { |
1346 |
this.currentFrame.addStackItem(methodBinding.returnType); |
1636 |
this.currentFrame.numberOfStackItems -= parametersLength; |
1347 |
} |
1637 |
} |
|
|
1638 |
if (methodBinding.returnType != TypeBinding.VOID) { |
1639 |
this.currentFrame.addStackItem(methodBinding.returnType); |
1640 |
} |
1348 |
} |
1641 |
} |
1349 |
public void invokeStringConcatenationAppendForType(int typeID) { |
1642 |
public void invokeStringConcatenationAppendForType(int typeID) { |
1350 |
super.invokeStringConcatenationAppendForType(typeID); |
1643 |
super.invokeStringConcatenationAppendForType(typeID); |
1351 |
this.currentFrame.numberOfStackItems--; |
1644 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1645 |
this.currentFrame.numberOfStackItems--; |
1646 |
} |
1352 |
} |
1647 |
} |
1353 |
public void invokeStringConcatenationDefaultConstructor() { |
1648 |
public void invokeStringConcatenationDefaultConstructor() { |
1354 |
// invokespecial: java.lang.StringBuffer.<init>()V |
1649 |
// invokespecial: java.lang.StringBuffer.<init>()V |
1355 |
super.invokeStringConcatenationDefaultConstructor(); |
1650 |
super.invokeStringConcatenationDefaultConstructor(); |
1356 |
this.currentFrame.initializeReceiver(); |
1651 |
if (this.currentFrame.numberOfStackItems >= 1) { |
1357 |
this.currentFrame.numberOfStackItems--; // remove the top of stack |
1652 |
this.currentFrame.initializeReceiver(); |
|
|
1653 |
this.currentFrame.numberOfStackItems--; // remove the top of stack |
1654 |
} |
1358 |
} |
1655 |
} |
1359 |
public void invokeStringConcatenationStringConstructor() { |
1656 |
public void invokeStringConcatenationStringConstructor() { |
1360 |
super.invokeStringConcatenationStringConstructor(); |
1657 |
super.invokeStringConcatenationStringConstructor(); |
1361 |
this.currentFrame.numberOfStackItems--; // remove argument |
1658 |
if (this.currentFrame.numberOfStackItems >= 2) { |
1362 |
this.currentFrame.initializeReceiver(); |
1659 |
this.currentFrame.numberOfStackItems--; // remove argument |
1363 |
this.currentFrame.numberOfStackItems--; // remove the top of stack |
1660 |
this.currentFrame.initializeReceiver(); |
|
|
1661 |
this.currentFrame.numberOfStackItems--; // remove the top of stack |
1662 |
} |
1364 |
} |
1663 |
} |
1365 |
public void invokeStringConcatenationToString() { |
1664 |
public void invokeStringConcatenationToString() { |
1366 |
super.invokeStringConcatenationToString(); |
1665 |
super.invokeStringConcatenationToString(); |
1367 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeIds.T_JavaLangString, ConstantPool.JavaLangStringConstantPoolName); |
1666 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
1667 |
if (numberOfStackItems >= 1) { |
1668 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeIds.T_JavaLangString, ConstantPool.JavaLangStringConstantPoolName); |
1669 |
} |
1368 |
} |
1670 |
} |
1369 |
public void invokeStringValueOf(int typeID) { |
1671 |
public void invokeStringValueOf(int typeID) { |
1370 |
super.invokeStringValueOf(typeID); |
1672 |
super.invokeStringValueOf(typeID); |
1371 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeIds.T_JavaLangString, ConstantPool.JavaLangStringConstantPoolName); |
1673 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
1674 |
if (numberOfStackItems >= 1) { |
1675 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeIds.T_JavaLangString, ConstantPool.JavaLangStringConstantPoolName); |
1676 |
} |
1372 |
} |
1677 |
} |
1373 |
public void invokeSystemArraycopy() { |
1678 |
public void invokeSystemArraycopy() { |
1374 |
super.invokeSystemArraycopy(); |
1679 |
super.invokeSystemArraycopy(); |
1375 |
this.currentFrame.numberOfStackItems -= 5; |
1680 |
if (this.currentFrame.numberOfStackItems >= 5) { |
|
|
1681 |
this.currentFrame.numberOfStackItems -= 5; |
1682 |
} |
1376 |
} |
1683 |
} |
1377 |
public void invokeThrowableGetMessage() { |
1684 |
public void invokeThrowableGetMessage() { |
1378 |
super.invokeThrowableGetMessage(); |
1685 |
super.invokeThrowableGetMessage(); |
1379 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeIds.T_JavaLangString, ConstantPool.JavaLangStringConstantPoolName); |
1686 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
1687 |
if (numberOfStackItems >= 1) { |
1688 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeIds.T_JavaLangString, ConstantPool.JavaLangStringConstantPoolName); |
1689 |
} |
1380 |
} |
1690 |
} |
1381 |
public void invokevirtual(MethodBinding methodBinding) { |
1691 |
public void invokevirtual(MethodBinding methodBinding) { |
1382 |
super.invokevirtual(methodBinding); |
1692 |
super.invokevirtual(methodBinding); |
1383 |
int argCount = 1; |
1693 |
int argCount = 1; |
1384 |
argCount += methodBinding.parameters.length; |
1694 |
argCount += methodBinding.parameters.length; |
1385 |
this.currentFrame.numberOfStackItems -= argCount; |
1695 |
if (this.currentFrame.numberOfStackItems >= argCount) { |
1386 |
if (methodBinding.returnType != TypeBinding.VOID) { |
1696 |
this.currentFrame.numberOfStackItems -= argCount; |
1387 |
this.currentFrame.addStackItem(methodBinding.returnType); |
1697 |
} |
1388 |
} |
1698 |
if (methodBinding.returnType != TypeBinding.VOID) { |
|
|
1699 |
this.currentFrame.addStackItem(methodBinding.returnType); |
1700 |
} |
1389 |
} |
1701 |
} |
1390 |
public void ior() { |
1702 |
public void ior() { |
1391 |
super.ior(); |
1703 |
super.ior(); |
1392 |
this.currentFrame.numberOfStackItems--; |
1704 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1705 |
this.currentFrame.numberOfStackItems--; |
1706 |
} |
1393 |
} |
1707 |
} |
1394 |
public void irem() { |
1708 |
public void irem() { |
1395 |
super.irem(); |
1709 |
super.irem(); |
1396 |
this.currentFrame.numberOfStackItems--; |
1710 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1711 |
this.currentFrame.numberOfStackItems--; |
1712 |
} |
1397 |
} |
1713 |
} |
1398 |
public void ireturn() { |
1714 |
public void ireturn() { |
1399 |
super.ireturn(); |
1715 |
super.ireturn(); |
1400 |
this.currentFrame.numberOfStackItems--; |
1716 |
if (this.currentFrame.numberOfStackItems >= 1) { |
1401 |
this.framePositions.add(new Integer(this.position)); |
1717 |
this.currentFrame.numberOfStackItems--; |
|
|
1718 |
} |
1719 |
this.framePositions.add(new Integer(this.position)); |
1402 |
} |
1720 |
} |
1403 |
public void ishl() { |
1721 |
public void ishl() { |
1404 |
super.ishl(); |
1722 |
super.ishl(); |
1405 |
this.currentFrame.numberOfStackItems--; |
1723 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1724 |
this.currentFrame.numberOfStackItems--; |
1725 |
} |
1406 |
} |
1726 |
} |
1407 |
public void ishr() { |
1727 |
public void ishr() { |
1408 |
super.ishr(); |
1728 |
super.ishr(); |
1409 |
this.currentFrame.numberOfStackItems--; |
1729 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1730 |
this.currentFrame.numberOfStackItems--; |
1731 |
} |
1410 |
} |
1732 |
} |
1411 |
public void istore(int iArg) { |
1733 |
public void istore(int iArg) { |
1412 |
super.istore(iArg); |
1734 |
super.istore(iArg); |
1413 |
this.currentFrame.putLocal(iArg, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
1735 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
1414 |
this.currentFrame.numberOfStackItems--; |
1736 |
if (numberOfStackItems >= 1) { |
|
|
1737 |
this.currentFrame.putLocal(iArg, this.currentFrame.stackItems[numberOfStackItems - 1]); |
1738 |
this.currentFrame.numberOfStackItems--; |
1739 |
} |
1415 |
} |
1740 |
} |
1416 |
public void istore_0() { |
1741 |
public void istore_0() { |
1417 |
super.istore_0(); |
1742 |
super.istore_0(); |
1418 |
this.currentFrame.putLocal(0, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
1743 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
1419 |
this.currentFrame.numberOfStackItems--; |
1744 |
if (numberOfStackItems >= 1) { |
|
|
1745 |
this.currentFrame.putLocal(0, this.currentFrame.stackItems[numberOfStackItems - 1]); |
1746 |
this.currentFrame.numberOfStackItems--; |
1747 |
} |
1420 |
} |
1748 |
} |
1421 |
public void istore_1() { |
1749 |
public void istore_1() { |
1422 |
super.istore_1(); |
1750 |
super.istore_1(); |
1423 |
this.currentFrame.putLocal(1, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
1751 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
1424 |
this.currentFrame.numberOfStackItems--; |
1752 |
if (numberOfStackItems >= 1) { |
|
|
1753 |
this.currentFrame.putLocal(1, this.currentFrame.stackItems[numberOfStackItems - 1]); |
1754 |
this.currentFrame.numberOfStackItems--; |
1755 |
} |
1425 |
} |
1756 |
} |
1426 |
public void istore_2() { |
1757 |
public void istore_2() { |
1427 |
super.istore_2(); |
1758 |
super.istore_2(); |
1428 |
this.currentFrame.putLocal(2, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
1759 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
1429 |
this.currentFrame.numberOfStackItems--; |
1760 |
if (numberOfStackItems >= 1) { |
|
|
1761 |
this.currentFrame.putLocal(2, this.currentFrame.stackItems[numberOfStackItems - 1]); |
1762 |
this.currentFrame.numberOfStackItems--; |
1763 |
} |
1430 |
} |
1764 |
} |
1431 |
public void istore_3() { |
1765 |
public void istore_3() { |
1432 |
super.istore_3(); |
1766 |
super.istore_3(); |
1433 |
this.currentFrame.putLocal(3, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
1767 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
1434 |
this.currentFrame.numberOfStackItems--; |
1768 |
if (numberOfStackItems >= 1) { |
|
|
1769 |
this.currentFrame.putLocal(3, this.currentFrame.stackItems[numberOfStackItems - 1]); |
1770 |
this.currentFrame.numberOfStackItems--; |
1771 |
} |
1435 |
} |
1772 |
} |
1436 |
public void isub() { |
1773 |
public void isub() { |
1437 |
super.isub(); |
1774 |
super.isub(); |
1438 |
this.currentFrame.numberOfStackItems--; |
1775 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1776 |
this.currentFrame.numberOfStackItems--; |
1777 |
} |
1439 |
} |
1778 |
} |
1440 |
public void iushr() { |
1779 |
public void iushr() { |
1441 |
super.iushr(); |
1780 |
super.iushr(); |
1442 |
this.currentFrame.numberOfStackItems--; |
1781 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1782 |
this.currentFrame.numberOfStackItems--; |
1783 |
} |
1443 |
} |
1784 |
} |
1444 |
public void ixor() { |
1785 |
public void ixor() { |
1445 |
super.ixor(); |
1786 |
super.ixor(); |
1446 |
this.currentFrame.numberOfStackItems--; |
1787 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1788 |
this.currentFrame.numberOfStackItems--; |
1789 |
} |
1447 |
} |
1790 |
} |
1448 |
public void l2d() { |
1791 |
public void l2d() { |
1449 |
super.l2d(); |
1792 |
super.l2d(); |
1450 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.DOUBLE); |
1793 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
1794 |
if (numberOfStackItems >= 1) { |
1795 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.DOUBLE); |
1796 |
} |
1451 |
} |
1797 |
} |
1452 |
public void l2f() { |
1798 |
public void l2f() { |
1453 |
super.l2f(); |
1799 |
super.l2f(); |
1454 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.FLOAT); |
1800 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
1801 |
if (numberOfStackItems >= 1) { |
1802 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.FLOAT); |
1803 |
} |
1455 |
} |
1804 |
} |
1456 |
public void l2i() { |
1805 |
public void l2i() { |
1457 |
super.l2i(); |
1806 |
super.l2i(); |
1458 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.INT); |
1807 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
1808 |
if (numberOfStackItems >= 1) { |
1809 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.INT); |
1810 |
} |
1459 |
} |
1811 |
} |
1460 |
public void ladd() { |
1812 |
public void ladd() { |
1461 |
super.ladd(); |
1813 |
super.ladd(); |
1462 |
this.currentFrame.numberOfStackItems--; |
1814 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1815 |
this.currentFrame.numberOfStackItems--; |
1816 |
} |
1463 |
} |
1817 |
} |
1464 |
public void laload() { |
1818 |
public void laload() { |
1465 |
super.laload(); |
1819 |
super.laload(); |
1466 |
this.currentFrame.numberOfStackItems--; |
1820 |
if (this.currentFrame.numberOfStackItems >= 2) { |
1467 |
this.currentFrame.replaceWithElementType(); |
1821 |
this.currentFrame.numberOfStackItems--; |
|
|
1822 |
this.currentFrame.replaceWithElementType(); |
1823 |
} |
1468 |
} |
1824 |
} |
1469 |
public void land() { |
1825 |
public void land() { |
1470 |
super.land(); |
1826 |
super.land(); |
1471 |
this.currentFrame.numberOfStackItems--; |
1827 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1828 |
this.currentFrame.numberOfStackItems--; |
1829 |
} |
1472 |
} |
1830 |
} |
1473 |
public void lastore() { |
1831 |
public void lastore() { |
1474 |
super.lastore(); |
1832 |
super.lastore(); |
1475 |
this.currentFrame.numberOfStackItems -= 3; |
1833 |
if (this.currentFrame.numberOfStackItems >= 3) { |
|
|
1834 |
this.currentFrame.numberOfStackItems -= 3; |
1835 |
} |
1476 |
} |
1836 |
} |
1477 |
public void lcmp() { |
1837 |
public void lcmp() { |
1478 |
super.lcmp(); |
1838 |
super.lcmp(); |
1479 |
this.currentFrame.numberOfStackItems--; |
1839 |
if (this.currentFrame.numberOfStackItems >= 2) { |
1480 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.INT); |
1840 |
this.currentFrame.numberOfStackItems--; |
|
|
1841 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.INT); |
1842 |
} |
1481 |
} |
1843 |
} |
1482 |
public void lconst_0() { |
1844 |
public void lconst_0() { |
1483 |
super.lconst_0(); |
1845 |
super.lconst_0(); |
1484 |
this.currentFrame.addStackItem(TypeBinding.LONG); |
1846 |
this.currentFrame.addStackItem(TypeBinding.LONG); |
1485 |
} |
1847 |
} |
1486 |
public void lconst_1() { |
1848 |
public void lconst_1() { |
1487 |
super.lconst_1(); |
1849 |
super.lconst_1(); |
1488 |
this.currentFrame.addStackItem(TypeBinding.LONG); |
1850 |
this.currentFrame.addStackItem(TypeBinding.LONG); |
1489 |
} |
1851 |
} |
1490 |
public void ldc(float constant) { |
1852 |
public void ldc(float constant) { |
1491 |
super.ldc(constant); |
1853 |
super.ldc(constant); |
1492 |
this.currentFrame.addStackItem(TypeBinding.FLOAT); |
1854 |
this.currentFrame.addStackItem(TypeBinding.FLOAT); |
1493 |
} |
1855 |
} |
1494 |
public void ldc(int constant) { |
1856 |
public void ldc(int constant) { |
1495 |
super.ldc(constant); |
1857 |
super.ldc(constant); |
1496 |
this.currentFrame.addStackItem(TypeBinding.INT); |
1858 |
this.currentFrame.addStackItem(TypeBinding.INT); |
1497 |
} |
1859 |
} |
1498 |
public void ldc(TypeBinding typeBinding) { |
1860 |
public void ldc(TypeBinding typeBinding) { |
1499 |
super.ldc(typeBinding); |
1861 |
super.ldc(typeBinding); |
1500 |
this.currentFrame.addStackItem(typeBinding); |
1862 |
this.currentFrame.addStackItem(typeBinding); |
1501 |
} |
1863 |
} |
1502 |
public void ldc2_w(double constant) { |
1864 |
public void ldc2_w(double constant) { |
1503 |
super.ldc2_w(constant); |
1865 |
super.ldc2_w(constant); |
1504 |
this.currentFrame.addStackItem(TypeBinding.DOUBLE); |
1866 |
this.currentFrame.addStackItem(TypeBinding.DOUBLE); |
1505 |
} |
1867 |
} |
1506 |
public void ldc2_w(long constant) { |
1868 |
public void ldc2_w(long constant) { |
1507 |
super.ldc2_w(constant); |
1869 |
super.ldc2_w(constant); |
1508 |
this.currentFrame.addStackItem(TypeBinding.LONG); |
1870 |
this.currentFrame.addStackItem(TypeBinding.LONG); |
1509 |
} |
1871 |
} |
1510 |
public void ldcForIndex(int index, char[] constant) { |
1872 |
public void ldcForIndex(int index, char[] constant) { |
1511 |
super.ldcForIndex(index, constant); |
1873 |
super.ldcForIndex(index, constant); |
1512 |
this.currentFrame.addStackItem(new VerificationTypeInfo(TypeIds.T_JavaLangString, ConstantPool.JavaLangStringConstantPoolName)); |
1874 |
this.currentFrame.addStackItem(new VerificationTypeInfo(TypeIds.T_JavaLangString, ConstantPool.JavaLangStringConstantPoolName)); |
1513 |
} |
1875 |
} |
1514 |
public void ldiv() { |
1876 |
public void ldiv() { |
1515 |
super.ldiv(); |
1877 |
super.ldiv(); |
1516 |
this.currentFrame.numberOfStackItems--; |
1878 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1879 |
this.currentFrame.numberOfStackItems--; |
1880 |
} |
1517 |
} |
1881 |
} |
1518 |
public void lload(int iArg) { |
1882 |
public void lload(int iArg) { |
1519 |
super.lload(iArg); |
1883 |
super.lload(iArg); |
1520 |
this.currentFrame.addStackItem(getLocal(iArg, this.currentFrame)); |
1884 |
this.currentFrame.addStackItem(getLocal(iArg, this.currentFrame)); |
1521 |
} |
1885 |
} |
1522 |
public void lload_0() { |
1886 |
public void lload_0() { |
1523 |
super.lload_0(); |
1887 |
super.lload_0(); |
1524 |
this.currentFrame.addStackItem(getLocal(0, this.currentFrame)); |
1888 |
this.currentFrame.addStackItem(getLocal(0, this.currentFrame)); |
1525 |
} |
1889 |
} |
1526 |
public void lload_1() { |
1890 |
public void lload_1() { |
1527 |
super.lload_1(); |
1891 |
super.lload_1(); |
1528 |
this.currentFrame.addStackItem(getLocal(1, this.currentFrame)); |
1892 |
this.currentFrame.addStackItem(getLocal(1, this.currentFrame)); |
1529 |
} |
1893 |
} |
1530 |
public void lload_2() { |
1894 |
public void lload_2() { |
1531 |
super.lload_2(); |
1895 |
super.lload_2(); |
1532 |
this.currentFrame.addStackItem(getLocal(2, this.currentFrame)); |
1896 |
this.currentFrame.addStackItem(getLocal(2, this.currentFrame)); |
1533 |
} |
1897 |
} |
1534 |
public void lload_3() { |
1898 |
public void lload_3() { |
1535 |
super.lload_3(); |
1899 |
super.lload_3(); |
1536 |
this.currentFrame.addStackItem(getLocal(3, this.currentFrame)); |
1900 |
this.currentFrame.addStackItem(getLocal(3, this.currentFrame)); |
1537 |
} |
1901 |
} |
1538 |
public void lmul() { |
1902 |
public void lmul() { |
1539 |
super.lmul(); |
1903 |
super.lmul(); |
1540 |
this.currentFrame.numberOfStackItems--; |
1904 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1905 |
this.currentFrame.numberOfStackItems--; |
1906 |
} |
1541 |
} |
1907 |
} |
1542 |
public void lookupswitch(CaseLabel defaultLabel, int[] keys, int[] sortedIndexes, CaseLabel[] casesLabel) { |
1908 |
public void lookupswitch(CaseLabel defaultLabel, int[] keys, int[] sortedIndexes, CaseLabel[] casesLabel) { |
1543 |
super.lookupswitch(defaultLabel, keys, sortedIndexes, casesLabel); |
1909 |
super.lookupswitch(defaultLabel, keys, sortedIndexes, casesLabel); |
1544 |
this.currentFrame.numberOfStackItems--; |
1910 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1911 |
this.currentFrame.numberOfStackItems--; |
1912 |
} |
1545 |
} |
1913 |
} |
1546 |
public void lor() { |
1914 |
public void lor() { |
1547 |
super.lor(); |
1915 |
super.lor(); |
1548 |
this.currentFrame.numberOfStackItems--; |
1916 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1917 |
this.currentFrame.numberOfStackItems--; |
1918 |
} |
1549 |
} |
1919 |
} |
1550 |
public void lrem() { |
1920 |
public void lrem() { |
1551 |
super.lrem(); |
1921 |
super.lrem(); |
1552 |
this.currentFrame.numberOfStackItems--; |
1922 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1923 |
this.currentFrame.numberOfStackItems--; |
1924 |
} |
1553 |
} |
1925 |
} |
1554 |
public void lreturn() { |
1926 |
public void lreturn() { |
1555 |
super.lreturn(); |
1927 |
super.lreturn(); |
1556 |
this.currentFrame.numberOfStackItems--; |
1928 |
if (this.currentFrame.numberOfStackItems >= 1) { |
1557 |
this.framePositions.add(new Integer(this.position)); |
1929 |
this.currentFrame.numberOfStackItems--; |
|
|
1930 |
} |
1931 |
this.framePositions.add(new Integer(this.position)); |
1558 |
} |
1932 |
} |
1559 |
public void lshl() { |
1933 |
public void lshl() { |
1560 |
super.lshl(); |
1934 |
super.lshl(); |
1561 |
this.currentFrame.numberOfStackItems--; |
1935 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1936 |
this.currentFrame.numberOfStackItems--; |
1937 |
} |
1562 |
} |
1938 |
} |
1563 |
public void lshr() { |
1939 |
public void lshr() { |
1564 |
super.lshr(); |
1940 |
super.lshr(); |
1565 |
this.currentFrame.numberOfStackItems--; |
1941 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1942 |
this.currentFrame.numberOfStackItems--; |
1943 |
} |
1566 |
} |
1944 |
} |
1567 |
public void lstore(int iArg) { |
1945 |
public void lstore(int iArg) { |
1568 |
super.lstore(iArg); |
1946 |
super.lstore(iArg); |
1569 |
this.currentFrame.putLocal(iArg, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
1947 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
1570 |
this.currentFrame.numberOfStackItems--; |
1948 |
if (numberOfStackItems >= 1) { |
|
|
1949 |
this.currentFrame.putLocal(iArg, this.currentFrame.stackItems[numberOfStackItems - 1]); |
1950 |
this.currentFrame.numberOfStackItems--; |
1951 |
} |
1571 |
} |
1952 |
} |
1572 |
public void lstore_0() { |
1953 |
public void lstore_0() { |
1573 |
super.lstore_0(); |
1954 |
super.lstore_0(); |
1574 |
this.currentFrame.putLocal(0, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
1955 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
1575 |
this.currentFrame.numberOfStackItems--; |
1956 |
if (numberOfStackItems >= 1) { |
|
|
1957 |
this.currentFrame.putLocal(0, this.currentFrame.stackItems[numberOfStackItems - 1]); |
1958 |
this.currentFrame.numberOfStackItems--; |
1959 |
} |
1576 |
} |
1960 |
} |
1577 |
public void lstore_1() { |
1961 |
public void lstore_1() { |
1578 |
super.lstore_1(); |
1962 |
super.lstore_1(); |
1579 |
this.currentFrame.putLocal(1, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
1963 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
1580 |
this.currentFrame.numberOfStackItems--; |
1964 |
if (numberOfStackItems >= 1) { |
|
|
1965 |
this.currentFrame.putLocal(1, this.currentFrame.stackItems[numberOfStackItems - 1]); |
1966 |
this.currentFrame.numberOfStackItems--; |
1967 |
} |
1581 |
} |
1968 |
} |
1582 |
public void lstore_2() { |
1969 |
public void lstore_2() { |
1583 |
super.lstore_2(); |
1970 |
super.lstore_2(); |
1584 |
this.currentFrame.putLocal(2, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
1971 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
1585 |
this.currentFrame.numberOfStackItems--; |
1972 |
if (numberOfStackItems >= 1) { |
|
|
1973 |
this.currentFrame.putLocal(2, this.currentFrame.stackItems[numberOfStackItems - 1]); |
1974 |
this.currentFrame.numberOfStackItems--; |
1975 |
} |
1586 |
} |
1976 |
} |
1587 |
public void lstore_3() { |
1977 |
public void lstore_3() { |
1588 |
super.lstore_3(); |
1978 |
super.lstore_3(); |
1589 |
this.currentFrame.putLocal(3, this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1]); |
1979 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
1590 |
this.currentFrame.numberOfStackItems--; |
1980 |
if (numberOfStackItems >= 1) { |
|
|
1981 |
this.currentFrame.putLocal(3, this.currentFrame.stackItems[numberOfStackItems - 1]); |
1982 |
this.currentFrame.numberOfStackItems--; |
1983 |
} |
1591 |
} |
1984 |
} |
1592 |
public void lsub() { |
1985 |
public void lsub() { |
1593 |
super.lsub(); |
1986 |
super.lsub(); |
1594 |
this.currentFrame.numberOfStackItems--; |
1987 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1988 |
this.currentFrame.numberOfStackItems--; |
1989 |
} |
1595 |
} |
1990 |
} |
1596 |
public void lushr() { |
1991 |
public void lushr() { |
1597 |
super.lushr(); |
1992 |
super.lushr(); |
1598 |
this.currentFrame.numberOfStackItems--; |
1993 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
1994 |
this.currentFrame.numberOfStackItems--; |
1995 |
} |
1599 |
} |
1996 |
} |
1600 |
public void lxor() { |
1997 |
public void lxor() { |
1601 |
super.lxor(); |
1998 |
super.lxor(); |
1602 |
this.currentFrame.numberOfStackItems--; |
1999 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
2000 |
this.currentFrame.numberOfStackItems--; |
2001 |
} |
1603 |
} |
2002 |
} |
1604 |
public void monitorenter() { |
2003 |
public void monitorenter() { |
1605 |
super.monitorenter(); |
2004 |
super.monitorenter(); |
1606 |
this.currentFrame.numberOfStackItems--; |
2005 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
2006 |
this.currentFrame.numberOfStackItems--; |
2007 |
} |
1607 |
} |
2008 |
} |
1608 |
public void monitorexit() { |
2009 |
public void monitorexit() { |
1609 |
super.monitorexit(); |
2010 |
super.monitorexit(); |
1610 |
this.currentFrame.numberOfStackItems--; |
2011 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
2012 |
this.currentFrame.numberOfStackItems--; |
2013 |
} |
1611 |
} |
2014 |
} |
1612 |
public void multianewarray(TypeBinding typeBinding, int dimensions) { |
2015 |
public void multianewarray(TypeBinding typeBinding, int dimensions) { |
1613 |
super.multianewarray(typeBinding, dimensions); |
2016 |
super.multianewarray(typeBinding, dimensions); |
1614 |
this.currentFrame.numberOfStackItems -= dimensions; |
2017 |
if (this.currentFrame.numberOfStackItems >= dimensions) { |
1615 |
char[] brackets = new char[dimensions]; |
2018 |
this.currentFrame.numberOfStackItems -= dimensions; |
1616 |
for (int i = dimensions - 1; i >= 0; i--) brackets[i] = '['; |
2019 |
} |
1617 |
char[] constantPoolName = CharOperation.concat(brackets, typeBinding.constantPoolName()); |
2020 |
char[] brackets = new char[dimensions]; |
1618 |
this.currentFrame.addStackItem(new VerificationTypeInfo(typeBinding.id, constantPoolName)); |
2021 |
for (int i = dimensions - 1; i >= 0; i--) brackets[i] = '['; |
|
|
2022 |
char[] constantPoolName = CharOperation.concat(brackets, typeBinding.constantPoolName()); |
2023 |
this.currentFrame.addStackItem(new VerificationTypeInfo(typeBinding.id, constantPoolName)); |
1619 |
} |
2024 |
} |
1620 |
// We didn't call it new, because there is a conflit with the new keyword |
2025 |
// We didn't call it new, because there is a conflit with the new keyword |
1621 |
public void new_(TypeBinding typeBinding) { |
2026 |
public void new_(TypeBinding typeBinding) { |
1622 |
int pc = this.position; |
2027 |
int pc = this.position; |
1623 |
super.new_(typeBinding); |
2028 |
super.new_(typeBinding); |
1624 |
final VerificationTypeInfo verificationTypeInfo = new VerificationTypeInfo(VerificationTypeInfo.ITEM_UNINITIALIZED, typeBinding); |
2029 |
final VerificationTypeInfo verificationTypeInfo = new VerificationTypeInfo(VerificationTypeInfo.ITEM_UNINITIALIZED, typeBinding); |
1625 |
verificationTypeInfo.offset = pc; |
2030 |
verificationTypeInfo.offset = pc; |
1626 |
this.currentFrame.addStackItem(verificationTypeInfo); |
2031 |
this.currentFrame.addStackItem(verificationTypeInfo); |
1627 |
} |
2032 |
} |
1628 |
public void newarray(int array_Type) { |
2033 |
public void newarray(int array_Type) { |
1629 |
super.newarray(array_Type); |
2034 |
super.newarray(array_Type); |
1630 |
char[] constantPoolName = null; |
2035 |
char[] constantPoolName = null; |
1631 |
switch (array_Type) { |
2036 |
switch (array_Type) { |
1632 |
case ClassFileConstants.INT_ARRAY : |
2037 |
case ClassFileConstants.INT_ARRAY : |
1633 |
constantPoolName = new char[] { '[', 'I' }; |
2038 |
constantPoolName = new char[] { '[', 'I' }; |
1634 |
break; |
2039 |
break; |
1635 |
case ClassFileConstants.BYTE_ARRAY : |
2040 |
case ClassFileConstants.BYTE_ARRAY : |
1636 |
constantPoolName = new char[] { '[', 'B' }; |
2041 |
constantPoolName = new char[] { '[', 'B' }; |
1637 |
break; |
2042 |
break; |
1638 |
case ClassFileConstants.BOOLEAN_ARRAY : |
2043 |
case ClassFileConstants.BOOLEAN_ARRAY : |
1639 |
constantPoolName = new char[] { '[', 'Z' }; |
2044 |
constantPoolName = new char[] { '[', 'Z' }; |
1640 |
break; |
2045 |
break; |
1641 |
case ClassFileConstants.SHORT_ARRAY : |
2046 |
case ClassFileConstants.SHORT_ARRAY : |
1642 |
constantPoolName = new char[] { '[', 'S' }; |
2047 |
constantPoolName = new char[] { '[', 'S' }; |
1643 |
break; |
2048 |
break; |
1644 |
case ClassFileConstants.CHAR_ARRAY : |
2049 |
case ClassFileConstants.CHAR_ARRAY : |
1645 |
constantPoolName = new char[] { '[', 'C' }; |
2050 |
constantPoolName = new char[] { '[', 'C' }; |
1646 |
break; |
2051 |
break; |
1647 |
case ClassFileConstants.LONG_ARRAY : |
2052 |
case ClassFileConstants.LONG_ARRAY : |
1648 |
constantPoolName = new char[] { '[', 'J' }; |
2053 |
constantPoolName = new char[] { '[', 'J' }; |
1649 |
break; |
2054 |
break; |
1650 |
case ClassFileConstants.FLOAT_ARRAY : |
2055 |
case ClassFileConstants.FLOAT_ARRAY : |
1651 |
constantPoolName = new char[] { '[', 'F' }; |
2056 |
constantPoolName = new char[] { '[', 'F' }; |
1652 |
break; |
2057 |
break; |
1653 |
case ClassFileConstants.DOUBLE_ARRAY : |
2058 |
case ClassFileConstants.DOUBLE_ARRAY : |
1654 |
constantPoolName = new char[] { '[', 'D' }; |
2059 |
constantPoolName = new char[] { '[', 'D' }; |
1655 |
break; |
2060 |
break; |
1656 |
} |
2061 |
} |
1657 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeIds.T_JavaLangObject, constantPoolName); |
2062 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
|
|
2063 |
if (numberOfStackItems >= 1) { |
2064 |
this.currentFrame.stackItems[numberOfStackItems - 1] = new VerificationTypeInfo(TypeIds.T_JavaLangObject, constantPoolName); |
2065 |
} |
1658 |
} |
2066 |
} |
1659 |
public void newJavaLangAssertionError() { |
2067 |
public void newJavaLangAssertionError() { |
1660 |
int pc = this.position; |
2068 |
int pc = this.position; |
1661 |
super.newJavaLangAssertionError(); |
2069 |
super.newJavaLangAssertionError(); |
1662 |
final VerificationTypeInfo verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangAssertionError, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangAssertionErrorConstantPoolName); |
2070 |
final VerificationTypeInfo verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangAssertionError, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangAssertionErrorConstantPoolName); |
1663 |
verificationTypeInfo.offset = pc; |
2071 |
verificationTypeInfo.offset = pc; |
1664 |
this.currentFrame.addStackItem(verificationTypeInfo); |
2072 |
this.currentFrame.addStackItem(verificationTypeInfo); |
1665 |
} |
2073 |
} |
1666 |
public void newJavaLangError() { |
2074 |
public void newJavaLangError() { |
1667 |
int pc = this.position; |
2075 |
int pc = this.position; |
1668 |
super.newJavaLangError(); |
2076 |
super.newJavaLangError(); |
1669 |
final VerificationTypeInfo verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangError, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangErrorConstantPoolName); |
2077 |
final VerificationTypeInfo verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangError, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangErrorConstantPoolName); |
1670 |
verificationTypeInfo.offset = pc; |
2078 |
verificationTypeInfo.offset = pc; |
1671 |
this.currentFrame.addStackItem(verificationTypeInfo); |
2079 |
this.currentFrame.addStackItem(verificationTypeInfo); |
1672 |
} |
2080 |
} |
1673 |
public void newNoClassDefFoundError() { |
2081 |
public void newNoClassDefFoundError() { |
1674 |
int pc = this.position; |
2082 |
int pc = this.position; |
1675 |
super.newNoClassDefFoundError(); |
2083 |
super.newNoClassDefFoundError(); |
1676 |
final VerificationTypeInfo verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangNoClassDefError, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangNoClassDefFoundErrorConstantPoolName); |
2084 |
final VerificationTypeInfo verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangNoClassDefError, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangNoClassDefFoundErrorConstantPoolName); |
1677 |
verificationTypeInfo.offset = pc; |
2085 |
verificationTypeInfo.offset = pc; |
1678 |
this.currentFrame.addStackItem(verificationTypeInfo); |
2086 |
this.currentFrame.addStackItem(verificationTypeInfo); |
1679 |
} |
2087 |
} |
1680 |
public void newStringContatenation() { |
2088 |
public void newStringContatenation() { |
1681 |
int pc = this.position; |
2089 |
int pc = this.position; |
1682 |
super.newStringContatenation(); |
2090 |
super.newStringContatenation(); |
1683 |
// in 1.6, string concatenation uses StringBuilder |
2091 |
// in 1.6, string concatenation uses StringBuilder |
1684 |
final VerificationTypeInfo verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangStringBuilder, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangStringBuilderConstantPoolName); |
2092 |
final VerificationTypeInfo verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangStringBuilder, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangStringBuilderConstantPoolName); |
1685 |
verificationTypeInfo.offset = pc; |
2093 |
verificationTypeInfo.offset = pc; |
1686 |
this.currentFrame.addStackItem(verificationTypeInfo); |
2094 |
this.currentFrame.addStackItem(verificationTypeInfo); |
1687 |
} |
2095 |
} |
1688 |
public void newWrapperFor(int typeID) { |
2096 |
public void newWrapperFor(int typeID) { |
1689 |
int pc = this.position; |
2097 |
int pc = this.position; |
1690 |
super.newWrapperFor(typeID); |
2098 |
super.newWrapperFor(typeID); |
1691 |
VerificationTypeInfo verificationTypeInfo = null; |
2099 |
VerificationTypeInfo verificationTypeInfo = null; |
1692 |
switch (typeID) { |
2100 |
switch (typeID) { |
1693 |
case TypeIds.T_int : // new: java.lang.Integer |
2101 |
case TypeIds.T_int : // new: java.lang.Integer |
1694 |
verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangInteger, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangIntegerConstantPoolName); |
2102 |
verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangInteger, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangIntegerConstantPoolName); |
1695 |
this.currentFrame.addStackItem(verificationTypeInfo); |
2103 |
this.currentFrame.addStackItem(verificationTypeInfo); |
1696 |
break; |
2104 |
break; |
1697 |
case TypeIds.T_boolean : // new: java.lang.Boolean |
2105 |
case TypeIds.T_boolean : // new: java.lang.Boolean |
1698 |
verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangBoolean, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangBooleanConstantPoolName); |
2106 |
verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangBoolean, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangBooleanConstantPoolName); |
1699 |
this.currentFrame.addStackItem(verificationTypeInfo); |
2107 |
this.currentFrame.addStackItem(verificationTypeInfo); |
1700 |
break; |
2108 |
break; |
1701 |
case TypeIds.T_byte : // new: java.lang.Byte |
2109 |
case TypeIds.T_byte : // new: java.lang.Byte |
1702 |
verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangByte, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangByteConstantPoolName); |
2110 |
verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangByte, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangByteConstantPoolName); |
1703 |
this.currentFrame.addStackItem(verificationTypeInfo); |
2111 |
this.currentFrame.addStackItem(verificationTypeInfo); |
1704 |
break; |
2112 |
break; |
1705 |
case TypeIds.T_char : // new: java.lang.Character |
2113 |
case TypeIds.T_char : // new: java.lang.Character |
1706 |
verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangCharacter, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangCharacterConstantPoolName); |
2114 |
verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangCharacter, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangCharacterConstantPoolName); |
1707 |
this.currentFrame.addStackItem(verificationTypeInfo); |
2115 |
this.currentFrame.addStackItem(verificationTypeInfo); |
1708 |
break; |
2116 |
break; |
1709 |
case TypeIds.T_float : // new: java.lang.Float |
2117 |
case TypeIds.T_float : // new: java.lang.Float |
1710 |
verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangFloat, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangFloatConstantPoolName); |
2118 |
verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangFloat, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangFloatConstantPoolName); |
1711 |
this.currentFrame.addStackItem(verificationTypeInfo); |
2119 |
this.currentFrame.addStackItem(verificationTypeInfo); |
1712 |
break; |
2120 |
break; |
1713 |
case TypeIds.T_double : // new: java.lang.Double |
2121 |
case TypeIds.T_double : // new: java.lang.Double |
1714 |
verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangDouble, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangDoubleConstantPoolName); |
2122 |
verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangDouble, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangDoubleConstantPoolName); |
1715 |
this.currentFrame.addStackItem(verificationTypeInfo); |
2123 |
this.currentFrame.addStackItem(verificationTypeInfo); |
1716 |
break; |
2124 |
break; |
1717 |
case TypeIds.T_short : // new: java.lang.Short |
2125 |
case TypeIds.T_short : // new: java.lang.Short |
1718 |
verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangShort, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangShortConstantPoolName); |
2126 |
verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangShort, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangShortConstantPoolName); |
1719 |
this.currentFrame.addStackItem(verificationTypeInfo); |
2127 |
this.currentFrame.addStackItem(verificationTypeInfo); |
1720 |
break; |
2128 |
break; |
1721 |
case TypeIds.T_long : // new: java.lang.Long |
2129 |
case TypeIds.T_long : // new: java.lang.Long |
1722 |
verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangLong, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangLongConstantPoolName); |
2130 |
verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangLong, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangLongConstantPoolName); |
1723 |
this.currentFrame.addStackItem(verificationTypeInfo); |
2131 |
this.currentFrame.addStackItem(verificationTypeInfo); |
1724 |
break; |
2132 |
break; |
1725 |
case TypeIds.T_void : // new: java.lang.Void |
2133 |
case TypeIds.T_void : // new: java.lang.Void |
1726 |
verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangVoid, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangVoidConstantPoolName); |
2134 |
verificationTypeInfo = new VerificationTypeInfo(TypeIds.T_JavaLangVoid, VerificationTypeInfo.ITEM_UNINITIALIZED, ConstantPool.JavaLangVoidConstantPoolName); |
1727 |
this.currentFrame.addStackItem(verificationTypeInfo); |
2135 |
this.currentFrame.addStackItem(verificationTypeInfo); |
1728 |
} |
2136 |
} |
1729 |
if (verificationTypeInfo != null) { |
2137 |
if (verificationTypeInfo != null) { |
1730 |
verificationTypeInfo.offset = pc; |
2138 |
verificationTypeInfo.offset = pc; |
1731 |
} |
2139 |
} |
1732 |
} |
2140 |
} |
1733 |
public void optimizeBranch(int oldPosition, BranchLabel lbl) { |
2141 |
public void optimizeBranch(int oldPosition, BranchLabel lbl) { |
1734 |
super.optimizeBranch(oldPosition, lbl); |
2142 |
super.optimizeBranch(oldPosition, lbl); |
1735 |
int frameIndex = this.frames.size() - 1; |
2143 |
int frameIndex = this.frames.size() - 1; |
1736 |
loop: while(frameIndex > 0) { |
2144 |
loop: while(frameIndex > 0) { |
1737 |
StackMapFrame frame = (StackMapFrame) this.frames.get(frameIndex); |
2145 |
StackMapFrame frame = (StackMapFrame) this.frames.get(frameIndex); |
1738 |
if (frame.pc == oldPosition) { |
2146 |
if (frame.pc == oldPosition) { |
1739 |
if (this.framePositions.remove(new Integer(oldPosition))) { |
2147 |
if (this.framePositions.remove(new Integer(oldPosition))) { |
1740 |
this.framePositions.add(new Integer(this.position)); |
2148 |
this.framePositions.add(new Integer(this.position)); |
1741 |
} |
2149 |
} |
1742 |
if (this.variablesModificationsPositions.remove(new Integer(oldPosition))) { |
2150 |
if (this.variablesModificationsPositions.remove(new Integer(oldPosition))) { |
1743 |
this.variablesModificationsPositions.add(new Integer(this.position)); |
2151 |
this.variablesModificationsPositions.add(new Integer(this.position)); |
1744 |
} |
2152 |
} |
1745 |
frame.pc = this.position; |
2153 |
frame.pc = this.position; |
1746 |
StackMapFrame previousFrame = (StackMapFrame) this.frames.get(frameIndex - 1); |
2154 |
StackMapFrame previousFrame = (StackMapFrame) this.frames.get(frameIndex - 1); |
1747 |
if (previousFrame.pc == this.position) { |
2155 |
if (previousFrame.pc == this.position) { |
1748 |
// remove the current frame |
2156 |
// remove the current frame |
1749 |
this.frames.set(frameIndex - 1, frame); |
2157 |
this.frames.set(frameIndex - 1, frame); |
1750 |
this.frames.remove(frameIndex); |
2158 |
this.frames.remove(frameIndex); |
1751 |
} |
2159 |
} |
1752 |
break loop; |
2160 |
break loop; |
1753 |
} else if (frame.pc > oldPosition) { |
2161 |
} else if (frame.pc > oldPosition) { |
1754 |
return; |
2162 |
return; |
1755 |
} |
2163 |
} |
1756 |
frameIndex--; |
2164 |
frameIndex--; |
1757 |
} |
2165 |
} |
1758 |
} |
2166 |
} |
1759 |
public void pop() { |
2167 |
public void pop() { |
1760 |
super.pop(); |
2168 |
super.pop(); |
1761 |
this.currentFrame.numberOfStackItems--; |
2169 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
2170 |
this.currentFrame.numberOfStackItems--; |
2171 |
} |
1762 |
} |
2172 |
} |
1763 |
public void pop2() { |
2173 |
public void pop2() { |
1764 |
super.pop2(); |
2174 |
super.pop2(); |
1765 |
switch(this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1].id()) { |
2175 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
1766 |
case TypeIds.T_long : |
2176 |
if (numberOfStackItems >= 1) { |
1767 |
case TypeIds.T_double : |
2177 |
switch(this.currentFrame.stackItems[numberOfStackItems - 1].id()) { |
1768 |
this.currentFrame.numberOfStackItems--; |
2178 |
case TypeIds.T_long : |
1769 |
break; |
2179 |
case TypeIds.T_double : |
1770 |
default: |
2180 |
this.currentFrame.numberOfStackItems--; |
1771 |
this.currentFrame.numberOfStackItems -= 2; |
2181 |
break; |
1772 |
} |
2182 |
default: |
|
|
2183 |
if (numberOfStackItems >= 2) { |
2184 |
this.currentFrame.numberOfStackItems -= 2; |
2185 |
} |
2186 |
} |
2187 |
} |
1773 |
} |
2188 |
} |
1774 |
public void popStateIndex() { |
2189 |
public void popStateIndex() { |
1775 |
this.stateIndexesCounter--; |
2190 |
this.stateIndexesCounter--; |
1776 |
} |
2191 |
} |
1777 |
public void pushOnStack(TypeBinding binding) { |
2192 |
public void pushOnStack(TypeBinding binding) { |
1778 |
super.pushOnStack(binding); |
2193 |
super.pushOnStack(binding); |
1779 |
this.currentFrame.addStackItem(binding); |
2194 |
this.currentFrame.addStackItem(binding); |
1780 |
} |
2195 |
} |
1781 |
public void putfield(FieldBinding fieldBinding) { |
2196 |
public void putfield(FieldBinding fieldBinding) { |
1782 |
super.putfield(fieldBinding); |
2197 |
super.putfield(fieldBinding); |
1783 |
this.currentFrame.numberOfStackItems -= 2; |
2198 |
if (this.currentFrame.numberOfStackItems >= 2) { |
|
|
2199 |
this.currentFrame.numberOfStackItems -= 2; |
2200 |
} |
1784 |
} |
2201 |
} |
1785 |
|
2202 |
|
1786 |
public void pushStateIndex(int naturalExitMergeInitStateIndex) { |
2203 |
public void pushStateIndex(int naturalExitMergeInitStateIndex) { |
1787 |
if (this.stateIndexes == null) { |
2204 |
if (this.stateIndexes == null) { |
1788 |
this.stateIndexes = new int[3]; |
2205 |
this.stateIndexes = new int[3]; |
1789 |
} |
2206 |
} |
1790 |
int length = this.stateIndexes.length; |
2207 |
int length = this.stateIndexes.length; |
1791 |
if (length == this.stateIndexesCounter) { |
2208 |
if (length == this.stateIndexesCounter) { |
1792 |
// resize |
2209 |
// resize |
1793 |
System.arraycopy(this.stateIndexes, 0, (this.stateIndexes = new int[length * 2]), 0, length); |
2210 |
System.arraycopy(this.stateIndexes, 0, (this.stateIndexes = new int[length * 2]), 0, length); |
1794 |
} |
2211 |
} |
1795 |
this.stateIndexes[this.stateIndexesCounter++] = naturalExitMergeInitStateIndex; |
2212 |
this.stateIndexes[this.stateIndexesCounter++] = naturalExitMergeInitStateIndex; |
1796 |
} |
2213 |
} |
1797 |
public void putstatic(FieldBinding fieldBinding) { |
2214 |
public void putstatic(FieldBinding fieldBinding) { |
1798 |
super.putstatic(fieldBinding); |
2215 |
super.putstatic(fieldBinding); |
1799 |
this.currentFrame.numberOfStackItems--; |
2216 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
2217 |
this.currentFrame.numberOfStackItems--; |
2218 |
} |
1800 |
} |
2219 |
} |
1801 |
public void recordExpressionType(TypeBinding typeBinding) { |
2220 |
public void recordExpressionType(TypeBinding typeBinding) { |
1802 |
super.recordExpressionType(typeBinding); |
2221 |
super.recordExpressionType(typeBinding); |
1803 |
this.currentFrame.setTopOfStack(typeBinding); |
2222 |
this.currentFrame.setTopOfStack(typeBinding); |
1804 |
} |
2223 |
} |
1805 |
public void removeVariable(LocalVariableBinding localBinding) { |
2224 |
public void removeVariable(LocalVariableBinding localBinding) { |
1806 |
this.currentFrame.removeLocals(localBinding.resolvedPosition); |
2225 |
this.currentFrame.removeLocals(localBinding.resolvedPosition); |
1807 |
super.removeVariable(localBinding); |
2226 |
super.removeVariable(localBinding); |
1808 |
} |
2227 |
} |
1809 |
public void removeNotDefinitelyAssignedVariables(Scope scope, int initStateIndex) { |
2228 |
public void removeNotDefinitelyAssignedVariables(Scope scope, int initStateIndex) { |
1810 |
int index = this.visibleLocalsCount; |
2229 |
int index = this.visibleLocalsCount; |
1811 |
loop : for (int i = 0; i < index; i++) { |
2230 |
loop : for (int i = 0; i < index; i++) { |
1812 |
LocalVariableBinding localBinding = visibleLocals[i]; |
2231 |
LocalVariableBinding localBinding = visibleLocals[i]; |
1813 |
if (localBinding != null && localBinding.initializationCount > 0) { |
2232 |
if (localBinding != null && localBinding.initializationCount > 0) { |
1814 |
boolean isDefinitelyAssigned = isDefinitelyAssigned(scope, initStateIndex, localBinding); |
2233 |
boolean isDefinitelyAssigned = isDefinitelyAssigned(scope, initStateIndex, localBinding); |
1815 |
if (!isDefinitelyAssigned) { |
2234 |
if (!isDefinitelyAssigned) { |
1816 |
if (this.stateIndexes != null) { |
2235 |
if (this.stateIndexes != null) { |
1817 |
for (int j = 0, max = this.stateIndexesCounter; j < max; j++) { |
2236 |
for (int j = 0, max = this.stateIndexesCounter; j < max; j++) { |
1818 |
if (isDefinitelyAssigned(scope, this.stateIndexes[j], localBinding)) { |
2237 |
if (isDefinitelyAssigned(scope, this.stateIndexes[j], localBinding)) { |
1819 |
continue loop; |
2238 |
continue loop; |
1820 |
} |
2239 |
} |
1821 |
} |
2240 |
} |
1822 |
} |
2241 |
} |
1823 |
this.currentFrame.removeLocals(localBinding.resolvedPosition); |
2242 |
this.currentFrame.removeLocals(localBinding.resolvedPosition); |
1824 |
localBinding.recordInitializationEndPC(position); |
2243 |
localBinding.recordInitializationEndPC(position); |
1825 |
} |
2244 |
} |
1826 |
} |
2245 |
} |
1827 |
} |
2246 |
} |
1828 |
Integer newValue = new Integer(this.position); |
2247 |
Integer newValue = new Integer(this.position); |
1829 |
if (this.variablesModificationsPositions.size() == 0 || !this.variablesModificationsPositions.get(this.variablesModificationsPositions.size() - 1).equals(newValue)) { |
2248 |
if (this.variablesModificationsPositions.size() == 0 || !this.variablesModificationsPositions.get(this.variablesModificationsPositions.size() - 1).equals(newValue)) { |
1830 |
this.variablesModificationsPositions.add(newValue); |
2249 |
this.variablesModificationsPositions.add(newValue); |
1831 |
} |
2250 |
} |
1832 |
storeStackMapFrame(); |
2251 |
storeStackMapFrame(); |
1833 |
} |
2252 |
} |
1834 |
public void storeStackMapFrame() { |
2253 |
public void storeStackMapFrame() { |
1835 |
int frameSize = this.frames.size(); |
2254 |
int frameSize = this.frames.size(); |
1836 |
StackMapFrame mapFrame = null; |
2255 |
StackMapFrame mapFrame = null; |
1837 |
try { |
2256 |
try { |
1838 |
mapFrame = (StackMapFrame) this.currentFrame.clone(); |
2257 |
mapFrame = (StackMapFrame) this.currentFrame.clone(); |
1839 |
mapFrame.pc = this.position; |
2258 |
mapFrame.pc = this.position; |
1840 |
} catch(CloneNotSupportedException e) { |
2259 |
} catch(CloneNotSupportedException e) { |
1841 |
// ignore |
2260 |
// ignore |
1842 |
} |
2261 |
} |
1843 |
if (frameSize == 0) { |
2262 |
if (frameSize == 0) { |
1844 |
this.frames.add(mapFrame); |
2263 |
this.frames.add(mapFrame); |
1845 |
} else { |
2264 |
} else { |
1846 |
StackMapFrame lastFrame = (StackMapFrame) this.frames.get(frameSize - 1); |
2265 |
StackMapFrame lastFrame = (StackMapFrame) this.frames.get(frameSize - 1); |
1847 |
if (lastFrame.pc == this.position) { |
2266 |
if (lastFrame.pc == this.position) { |
1848 |
this.frames.set(frameSize - 1, mapFrame); |
2267 |
this.frames.set(frameSize - 1, mapFrame); |
1849 |
} else { |
2268 |
} else { |
1850 |
this.frames.add(mapFrame); |
2269 |
this.frames.add(mapFrame); |
1851 |
} |
2270 |
} |
1852 |
} |
2271 |
} |
1853 |
} |
2272 |
} |
1854 |
public void return_() { |
2273 |
public void return_() { |
1855 |
super.return_(); |
2274 |
super.return_(); |
1856 |
this.framePositions.add(new Integer(this.position)); |
2275 |
this.framePositions.add(new Integer(this.position)); |
1857 |
} |
2276 |
} |
1858 |
public void saload() { |
2277 |
public void saload() { |
1859 |
super.saload(); |
2278 |
super.saload(); |
1860 |
this.currentFrame.numberOfStackItems--; |
2279 |
if (this.currentFrame.numberOfStackItems >= 2) { |
1861 |
this.currentFrame.replaceWithElementType(); |
2280 |
this.currentFrame.numberOfStackItems--; |
|
|
2281 |
this.currentFrame.replaceWithElementType(); |
2282 |
} |
1862 |
} |
2283 |
} |
1863 |
public void sastore() { |
2284 |
public void sastore() { |
1864 |
super.sastore(); |
2285 |
super.sastore(); |
1865 |
this.currentFrame.numberOfStackItems -= 3; |
2286 |
if (this.currentFrame.numberOfStackItems >= 3) { |
|
|
2287 |
this.currentFrame.numberOfStackItems -= 3; |
2288 |
} |
1866 |
} |
2289 |
} |
1867 |
public void sipush(int s) { |
2290 |
public void sipush(int s) { |
1868 |
super.sipush(s); |
2291 |
super.sipush(s); |
1869 |
this.currentFrame.addStackItem(TypeBinding.INT); |
2292 |
this.currentFrame.addStackItem(TypeBinding.INT); |
1870 |
} |
2293 |
} |
1871 |
public void store(LocalVariableBinding localBinding, boolean valueRequired) { |
2294 |
public void store(LocalVariableBinding localBinding, boolean valueRequired) { |
1872 |
super.store(localBinding, valueRequired); |
2295 |
super.store(localBinding, valueRequired); |
1873 |
final TypeBinding typeBinding = localBinding.type; |
2296 |
final TypeBinding typeBinding = localBinding.type; |
1874 |
switch(typeBinding.id) { |
2297 |
switch(typeBinding.id) { |
1875 |
default: |
2298 |
default: |
1876 |
// Reference object |
2299 |
// Reference object |
1877 |
this.currentFrame.locals[localBinding.resolvedPosition] = new VerificationTypeInfo(typeBinding); |
2300 |
this.currentFrame.locals[localBinding.resolvedPosition] = new VerificationTypeInfo(typeBinding); |
1878 |
} |
2301 |
} |
1879 |
} |
2302 |
} |
1880 |
public void swap() { |
2303 |
public void swap() { |
1881 |
super.swap(); |
2304 |
super.swap(); |
1882 |
try { |
2305 |
int numberOfStackItems = this.currentFrame.numberOfStackItems; |
1883 |
VerificationTypeInfo info = (VerificationTypeInfo) this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1].clone(); |
2306 |
if (numberOfStackItems >= 2) { |
1884 |
VerificationTypeInfo info2 = (VerificationTypeInfo) this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 2].clone(); |
2307 |
try { |
1885 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 1] = info2; |
2308 |
VerificationTypeInfo info = (VerificationTypeInfo) this.currentFrame.stackItems[numberOfStackItems - 1].clone(); |
1886 |
this.currentFrame.stackItems[this.currentFrame.numberOfStackItems - 2] = info; |
2309 |
VerificationTypeInfo info2 = (VerificationTypeInfo) this.currentFrame.stackItems[numberOfStackItems - 2].clone(); |
1887 |
} catch (CloneNotSupportedException e) { |
2310 |
this.currentFrame.stackItems[numberOfStackItems - 1] = info2; |
1888 |
// ignore |
2311 |
this.currentFrame.stackItems[numberOfStackItems - 2] = info; |
1889 |
} |
2312 |
} catch (CloneNotSupportedException e) { |
|
|
2313 |
// ignore |
2314 |
} |
2315 |
} |
1890 |
} |
2316 |
} |
1891 |
public void tableswitch(CaseLabel defaultLabel, int low, int high, int[] keys, int[] sortedIndexes, CaseLabel[] casesLabel) { |
2317 |
public void tableswitch(CaseLabel defaultLabel, int low, int high, int[] keys, int[] sortedIndexes, CaseLabel[] casesLabel) { |
1892 |
super.tableswitch(defaultLabel, low, high, keys, sortedIndexes, casesLabel); |
2318 |
super.tableswitch(defaultLabel, low, high, keys, sortedIndexes, casesLabel); |
1893 |
this.currentFrame.numberOfStackItems--; |
2319 |
if (this.currentFrame.numberOfStackItems >= 1) { |
|
|
2320 |
this.currentFrame.numberOfStackItems--; |
2321 |
} |
1894 |
} |
2322 |
} |
1895 |
public void throwAnyException(LocalVariableBinding anyExceptionVariable) { |
2323 |
public void throwAnyException(LocalVariableBinding anyExceptionVariable) { |
1896 |
this.currentFrame.putLocal(anyExceptionVariable.resolvedPosition, new VerificationTypeInfo(VerificationTypeInfo.ITEM_OBJECT, anyExceptionVariable.type)); |
2324 |
this.currentFrame.putLocal(anyExceptionVariable.resolvedPosition, new VerificationTypeInfo(VerificationTypeInfo.ITEM_OBJECT, anyExceptionVariable.type)); |
1897 |
super.throwAnyException(anyExceptionVariable); |
2325 |
super.throwAnyException(anyExceptionVariable); |
1898 |
this.currentFrame.removeLocals(anyExceptionVariable.resolvedPosition); |
2326 |
this.currentFrame.removeLocals(anyExceptionVariable.resolvedPosition); |
1899 |
} |
2327 |
} |
1900 |
public void removeStackFrameFor(int pos) { |
2328 |
public void removeStackFrameFor(int pos) { |
1901 |
// TODO (olivier) need to see how to get rid of some unnecessary frames |
2329 |
// TODO (olivier) need to see how to get rid of some unnecessary frames |
1902 |
} |
2330 |
} |
1903 |
public void reset(ClassFile givenClassFile) { |
2331 |
public void reset(ClassFile givenClassFile) { |
1904 |
super.reset(givenClassFile); |
2332 |
super.reset(givenClassFile); |
1905 |
this.frames = null; |
2333 |
this.frames = null; |
1906 |
this.currentFrame = null; |
2334 |
this.currentFrame = null; |
1907 |
this.framePositions = null; |
2335 |
this.framePositions = null; |
1908 |
this.variablesModificationsPositions = null; |
2336 |
this.variablesModificationsPositions = null; |
1909 |
} |
2337 |
} |
1910 |
protected void writePosition(BranchLabel label) { |
2338 |
protected void writePosition(BranchLabel label) { |
1911 |
super.writePosition(label); |
2339 |
super.writePosition(label); |
1912 |
framePositions.add(new Integer(label.position)); |
2340 |
framePositions.add(new Integer(label.position)); |
1913 |
} |
2341 |
} |
1914 |
protected void writeWidePosition(BranchLabel label) { |
2342 |
protected void writeWidePosition(BranchLabel label) { |
1915 |
super.writeWidePosition(label); |
2343 |
super.writeWidePosition(label); |
1916 |
framePositions.add(new Integer(label.position)); |
2344 |
framePositions.add(new Integer(label.position)); |
1917 |
} |
2345 |
} |
1918 |
protected void writePosition(BranchLabel label, int forwardReference) { |
2346 |
protected void writePosition(BranchLabel label, int forwardReference) { |
1919 |
super.writePosition(label, forwardReference); |
2347 |
super.writePosition(label, forwardReference); |
1920 |
framePositions.add(new Integer(label.position)); |
2348 |
framePositions.add(new Integer(label.position)); |
1921 |
} |
2349 |
} |
1922 |
} |
2350 |
} |