use of com.oracle.svm.hosted.c.info.StructInfo in project graal by oracle.
the class JNIJavaCallWrapperMethod method getJNIValueOffsetOf.
private StructFieldInfo getJNIValueOffsetOf(ResolvedJavaType jniValueType, JavaKind kind) {
String name = String.valueOf(kind.isObject() ? 'l' : Character.toLowerCase(kind.getTypeChar()));
StructInfo structInfo = (StructInfo) nativeLibs.findElementInfo(jniValueType);
for (ElementInfo elementInfo : structInfo.getChildren()) {
if (elementInfo instanceof StructFieldInfo) {
StructFieldInfo fieldInfo = (StructFieldInfo) elementInfo;
if (name.equals(fieldInfo.getName())) {
return fieldInfo;
}
}
}
throw VMError.shouldNotReachHere();
}
Aggregations