JITHandle getHandle(Signature signature, boolean unique) {
boolean hasResultConverter = !(signature.getResultType() instanceof Type.Builtin);
NativeType nativeResultType;
Type resultType = signature.getResultType();
if (resultType instanceof Type.Builtin || resultType instanceof CallbackInfo) {
nativeResultType = resultType.getNativeType();
} else if (resultType instanceof MappedType) {
nativeResultType = ((MappedType) resultType).getRealType().getNativeType();
} else {
return failedHandle;
}
NativeType[] nativeParameterTypes = new NativeType[signature.getParameterCount()];
boolean[] hasParameterConverter = new boolean[signature.getParameterCount()];
for (int i = 0; i < hasParameterConverter.length; i++) {
Type parameterType = signature.getParameterType(i);
if (parameterType instanceof Type.Builtin || parameterType instanceof CallbackInfo) {
nativeParameterTypes[i] = parameterType.getNativeType();
} else if (parameterType instanceof MappedType) {
nativeParameterTypes[i] = ((MappedType) parameterType).getRealType().getNativeType();
} else {