Class ByteBufferAccess
java.lang.Object
com.oracle.truffle.js.runtime.array.ByteBufferAccess
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final ByteBufferAccessintcompareExchangeInt16(ByteBuffer buffer, int index, int expectedValue, int newValue) Emulate 16-bit CAS using 32-bit CAS.abstract intcompareExchangeInt32(ByteBuffer buffer, int index, int expectedValue, int newValue) abstract longcompareExchangeInt64(ByteBuffer buffer, int index, long expectedValue, long newValue) intcompareExchangeInt8(ByteBuffer buffer, int index, int expectedValue, int newValue) Emulate 8-bit CAS using 32-bit CAS.static final ByteBufferAccessforOrder(boolean littleEndian) abstract doublegetDouble(ByteBuffer buffer, int index) abstract floatgetFloat(ByteBuffer buffer, int index) final shortgetFloat16(ByteBuffer buffer, int index) abstract intgetInt16(ByteBuffer buffer, int index) abstract intgetInt32(ByteBuffer buffer, int index) abstract longgetInt64(ByteBuffer buffer, int index) final intgetInt8(ByteBuffer buffer, int index) final intgetUint16(ByteBuffer buffer, int index) final intgetUint8(ByteBuffer buffer, int index) static final ByteBufferAccessstatic final ByteBufferAccessabstract voidputDouble(ByteBuffer buffer, int index, double value) abstract voidputFloat(ByteBuffer buffer, int index, float value) final voidputFloat16(ByteBuffer buffer, int index, short value) abstract voidputInt16(ByteBuffer buffer, int index, int value) abstract voidputInt32(ByteBuffer buffer, int index, int value) abstract voidputInt64(ByteBuffer buffer, int index, long value) final voidputInt8(ByteBuffer buffer, int index, int value)
-
Constructor Details
-
ByteBufferAccess
public ByteBufferAccess()
-
-
Method Details
-
getInt8
-
getUint8
-
getInt16
-
getUint16
-
getInt32
-
getFloat16
-
getFloat
-
getDouble
-
getInt64
-
putInt8
-
putInt16
-
putInt32
-
putFloat16
-
putFloat
-
putDouble
-
putInt64
-
compareExchangeInt32
public abstract int compareExchangeInt32(ByteBuffer buffer, int index, int expectedValue, int newValue) -
compareExchangeInt64
public abstract long compareExchangeInt64(ByteBuffer buffer, int index, long expectedValue, long newValue) -
compareExchangeInt8
Emulate 8-bit CAS using 32-bit CAS. Cannot be used if the buffer length is not a multiple of 4 and too short for the 32-bit access to be fully in bounds. -
compareExchangeInt16
Emulate 16-bit CAS using 32-bit CAS. Cannot be used if the buffer length is not a multiple of 4 and too short for the 32-bit access to be fully in bounds, or if the index is odd. -
littleEndian
-
bigEndian
-
nativeOrder
-
forOrder
-