Search in sources :

Example 1 with J9ROMArrayClassPointer

use of com.ibm.j9ddr.vm29.pointer.generated.J9ROMArrayClassPointer in project openj9 by eclipse.

the class GCContiguousArrayObjectModel_V1 method getHashcodeOffset.

public UDATA getHashcodeOffset(J9IndexableObjectPointer array) throws CorruptDataException {
    J9ArrayClassPointer clazz = J9IndexableObjectHelper.clazz(array);
    UDATA numberOfElements = getSizeInElements(array);
    J9ROMArrayClassPointer romArrayClass = J9ROMArrayClassPointer.cast(clazz.romClass());
    UDATA size = numberOfElements.leftShift(romArrayClass.arrayShape().bitAnd(0xFFFF).intValue());
    size = size.add(J9IndexableObjectContiguous.SIZEOF);
    return UDATA.roundToSizeofU32(size);
}
Also used : UDATA(com.ibm.j9ddr.vm29.types.UDATA) J9ROMArrayClassPointer(com.ibm.j9ddr.vm29.pointer.generated.J9ROMArrayClassPointer) J9ArrayClassPointer(com.ibm.j9ddr.vm29.pointer.generated.J9ArrayClassPointer)

Aggregations

J9ArrayClassPointer (com.ibm.j9ddr.vm29.pointer.generated.J9ArrayClassPointer)1 J9ROMArrayClassPointer (com.ibm.j9ddr.vm29.pointer.generated.J9ROMArrayClassPointer)1 UDATA (com.ibm.j9ddr.vm29.types.UDATA)1