Lines 1719-1725
Link Here
|
1719 |
FieldBinding fieldBinding = (FieldBinding) mappingSequence[i]; |
1719 |
FieldBinding fieldBinding = (FieldBinding) mappingSequence[i]; |
1720 |
this.getfield(fieldBinding); |
1720 |
this.getfield(fieldBinding); |
1721 |
} else { |
1721 |
} else { |
1722 |
this.invokestatic((MethodBinding) mappingSequence[i]); |
1722 |
MethodBinding methodBinding = (MethodBinding) mappingSequence[i]; |
|
|
1723 |
this.invokestatic(methodBinding.declaringClass, methodBinding); |
1723 |
} |
1724 |
} |
1724 |
} |
1725 |
} |
1725 |
} |
1726 |
} |
Lines 2055-2061
Link Here
|
2055 |
} |
2056 |
} |
2056 |
TypeBinding type; |
2057 |
TypeBinding type; |
2057 |
if (methodBinding.isStatic()) |
2058 |
if (methodBinding.isStatic()) |
2058 |
this.invokestatic(methodBinding); |
2059 |
this.invokestatic(methodBinding.declaringClass, methodBinding); |
2059 |
else { |
2060 |
else { |
2060 |
if (methodBinding.isConstructor() |
2061 |
if (methodBinding.isConstructor() |
2061 |
|| methodBinding.isPrivate() |
2062 |
|| methodBinding.isPrivate() |
Lines 3374-3379
Link Here
|
3374 |
position++; |
3375 |
position++; |
3375 |
bCodeStream[classFileOffset++] = OPC_invokestatic; |
3376 |
bCodeStream[classFileOffset++] = OPC_invokestatic; |
3376 |
writeUnsignedShort(constantPool.literalIndex(methodBinding)); |
3377 |
writeUnsignedShort(constantPool.literalIndex(methodBinding)); |
|
|
3378 |
for (int i = methodBinding.parameters.length - 1; i >= 0; i--) |
3379 |
if (((id = methodBinding.parameters[i].id) == T_double) || (id == T_long)) |
3380 |
argCount += 2; |
3381 |
else |
3382 |
argCount += 1; |
3383 |
if (((id = methodBinding.returnType.id) == T_double) || (id == T_long)) |
3384 |
stackDepth += (2 - argCount); |
3385 |
else |
3386 |
if (id == T_void) |
3387 |
stackDepth -= argCount; |
3388 |
else |
3389 |
stackDepth += (1 - argCount); |
3390 |
if (stackDepth > stackMax) |
3391 |
stackMax = stackDepth; |
3392 |
} |
3393 |
final public void invokestatic(TypeBinding actualReceiverType, MethodBinding methodBinding) { |
3394 |
if (DEBUG) System.out.println(position + "\t\tinvokestatic:"+methodBinding); //$NON-NLS-1$ |
3395 |
// initialized to 0 to take into account that there is no this for |
3396 |
// a static method |
3397 |
countLabels = 0; |
3398 |
int argCount = 0; |
3399 |
int id; |
3400 |
if (classFileOffset + 2 >= bCodeStream.length) { |
3401 |
resizeByteArray(); |
3402 |
} |
3403 |
position++; |
3404 |
bCodeStream[classFileOffset++] = OPC_invokestatic; |
3405 |
writeUnsignedShort(constantPool.literalIndexForMethod(actualReceiverType.constantPoolName(), methodBinding.selector, methodBinding.signature(), actualReceiverType.isInterface())); |
3377 |
for (int i = methodBinding.parameters.length - 1; i >= 0; i--) |
3406 |
for (int i = methodBinding.parameters.length - 1; i >= 0; i--) |
3378 |
if (((id = methodBinding.parameters[i].id) == T_double) || (id == T_long)) |
3407 |
if (((id = methodBinding.parameters[i].id) == T_double) || (id == T_long)) |
3379 |
argCount += 2; |
3408 |
argCount += 2; |