use of com.oracle.truffle.llvm.runtime.interop.access.LLVMInteropType.Clazz in project graal by oracle.
the class CommonPointerLibraries method isMemberReadable.
@ExportMessage
static boolean isMemberReadable(LLVMPointerImpl receiver, String ident, @Shared("isObject") @Cached ConditionProfile isObject) {
if (isObject.profile(receiver.getExportType() instanceof LLVMInteropType.Clazz)) {
LLVMInteropType.Clazz clazz = (LLVMInteropType.Clazz) receiver.getExportType();
LLVMInteropType.StructMember member = clazz.findMember(ident);
if (member == null) {
LLVMInteropType.Method method = clazz.findMethod(ident);
return method != null;
}
return member != null;
} else if (isObject.profile(receiver.getExportType() instanceof LLVMInteropType.Struct)) {
LLVMInteropType.Struct struct = (LLVMInteropType.Struct) receiver.getExportType();
LLVMInteropType.StructMember member = struct.findMember(ident);
return member != null;
} else {
return false;
}
}
Aggregations