Search in sources :

Example 1 with ValueType

use of com.oracle.svm.core.code.FrameInfoQueryResult.ValueType in project graal by oracle.

the class FrameInfoDecoder method decodeValues.

private static ValueInfo[] decodeValues(ValueInfoAllocator valueInfoAllocator, int numValues, TypeReader readBuffer, Object[] frameInfoObjectConstants) {
    ValueInfo[] valueInfos = valueInfoAllocator.newValueInfoArray(numValues);
    for (int i = 0; i < numValues; i++) {
        ValueInfo valueInfo = valueInfoAllocator.newValueInfo();
        if (valueInfos != null) {
            valueInfos[i] = valueInfo;
        }
        int flags = readBuffer.getU1();
        ValueType valueType = extractType(flags);
        if (valueInfo != null) {
            valueInfo.type = valueType;
            valueInfo.kind = extractKind(flags);
            valueInfo.isCompressedReference = extractIsCompressedReference(flags);
        }
        if (valueType.hasData) {
            long valueInfoData = readBuffer.getSV();
            if (valueInfo != null) {
                valueInfo.data = valueInfoData;
            }
        }
        valueInfoAllocator.decodeConstant(valueInfo, frameInfoObjectConstants);
    }
    return valueInfos;
}
Also used : ValueType(com.oracle.svm.core.code.FrameInfoQueryResult.ValueType) ValueInfo(com.oracle.svm.core.code.FrameInfoQueryResult.ValueInfo)

Aggregations

ValueInfo (com.oracle.svm.core.code.FrameInfoQueryResult.ValueInfo)1 ValueType (com.oracle.svm.core.code.FrameInfoQueryResult.ValueType)1