use of com.oracle.truffle.llvm.runtime.vector.LLVMVector in project graal by oracle.
the class CommonNodeFactory method asDebuggerIRValue.
private static Object asDebuggerIRValue(Object llvmType, Object value, DataLayout dataLayout) {
final Type type;
if (llvmType instanceof Type) {
type = (Type) llvmType;
} else {
return null;
}
// e.g. debugger symbols
if (type instanceof MetaType) {
return null;
}
final LLVMSourceType sourceType = LLVMSourceTypeFactory.resolveType(type, dataLayout);
if (sourceType == null) {
return null;
}
// after frame-nulling the actual vector length does not correspond to the type anymore
if (value instanceof LLVMVector && ((LLVMVector) value).getLength() == 0) {
return null;
}
// after frame-nulling the actual bitsize does not correspond to the type anymore
if (value instanceof LLVMIVarBit && ((LLVMIVarBit) value).getBitSize() == 0) {
return null;
}
final LLVMDebugValue debugValue = createDebugValueBuilder().build(value);
if (debugValue == LLVMDebugValue.UNAVAILABLE) {
return null;
}
return LLVMDebugObject.create(sourceType, 0L, debugValue, null);
}
Aggregations