use of jdk.vm.ci.meta.Signature in project graal by oracle.
the class StampFactory method createParameterStamps.
public static Stamp[] createParameterStamps(Assumptions assumptions, ResolvedJavaMethod method, boolean trustInterfaceTypes) {
Signature signature = method.getSignature();
Stamp[] result = new Stamp[signature.getParameterCount(method.hasReceiver())];
int index = 0;
ResolvedJavaType accessingClass = method.getDeclaringClass();
if (method.hasReceiver()) {
if (trustInterfaceTypes) {
result[index++] = StampFactory.objectNonNull(TypeReference.createTrusted(assumptions, accessingClass));
} else {
result[index++] = StampFactory.objectNonNull(TypeReference.create(assumptions, accessingClass));
}
}
for (int i = 0; i < signature.getParameterCount(false); i++) {
JavaType type = signature.getParameterType(i, accessingClass);
JavaKind kind = type.getJavaKind();
Stamp stamp;
if (kind == JavaKind.Object && type instanceof ResolvedJavaType) {
if (trustInterfaceTypes) {
stamp = StampFactory.object(TypeReference.createTrusted(assumptions, (ResolvedJavaType) type));
} else {
stamp = StampFactory.object(TypeReference.create(assumptions, (ResolvedJavaType) type));
}
} else {
stamp = StampFactory.forKind(kind);
}
result[index++] = stamp;
}
return result;
}
Aggregations