Search in sources :

Example 1 with LLVMVector

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);
}
Also used : VariableBitWidthType(com.oracle.truffle.llvm.runtime.types.VariableBitWidthType) PrimitiveType(com.oracle.truffle.llvm.runtime.types.PrimitiveType) VectorType(com.oracle.truffle.llvm.runtime.types.VectorType) AggregateType(com.oracle.truffle.llvm.runtime.types.AggregateType) PointerType(com.oracle.truffle.llvm.runtime.types.PointerType) FunctionType(com.oracle.truffle.llvm.runtime.types.FunctionType) MetaType(com.oracle.truffle.llvm.runtime.types.MetaType) LLVMSourceType(com.oracle.truffle.llvm.runtime.debug.type.LLVMSourceType) StructureType(com.oracle.truffle.llvm.runtime.types.StructureType) ArrayType(com.oracle.truffle.llvm.runtime.types.ArrayType) VoidType(com.oracle.truffle.llvm.runtime.types.VoidType) LLVMInteropType(com.oracle.truffle.llvm.runtime.interop.access.LLVMInteropType) ForeignToLLVMType(com.oracle.truffle.llvm.runtime.interop.convert.ForeignToLLVM.ForeignToLLVMType) Type(com.oracle.truffle.llvm.runtime.types.Type) LLVMVector(com.oracle.truffle.llvm.runtime.vector.LLVMVector) LLVMDebugValue(com.oracle.truffle.llvm.runtime.debug.value.LLVMDebugValue) LLVMSourceType(com.oracle.truffle.llvm.runtime.debug.type.LLVMSourceType) MetaType(com.oracle.truffle.llvm.runtime.types.MetaType)

Aggregations

LLVMSourceType (com.oracle.truffle.llvm.runtime.debug.type.LLVMSourceType)1 LLVMDebugValue (com.oracle.truffle.llvm.runtime.debug.value.LLVMDebugValue)1 LLVMInteropType (com.oracle.truffle.llvm.runtime.interop.access.LLVMInteropType)1 ForeignToLLVMType (com.oracle.truffle.llvm.runtime.interop.convert.ForeignToLLVM.ForeignToLLVMType)1 AggregateType (com.oracle.truffle.llvm.runtime.types.AggregateType)1 ArrayType (com.oracle.truffle.llvm.runtime.types.ArrayType)1 FunctionType (com.oracle.truffle.llvm.runtime.types.FunctionType)1 MetaType (com.oracle.truffle.llvm.runtime.types.MetaType)1 PointerType (com.oracle.truffle.llvm.runtime.types.PointerType)1 PrimitiveType (com.oracle.truffle.llvm.runtime.types.PrimitiveType)1 StructureType (com.oracle.truffle.llvm.runtime.types.StructureType)1 Type (com.oracle.truffle.llvm.runtime.types.Type)1 VariableBitWidthType (com.oracle.truffle.llvm.runtime.types.VariableBitWidthType)1 VectorType (com.oracle.truffle.llvm.runtime.types.VectorType)1 VoidType (com.oracle.truffle.llvm.runtime.types.VoidType)1 LLVMVector (com.oracle.truffle.llvm.runtime.vector.LLVMVector)1