< prev index next >

src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template

Print this page

        

*** 184,197 **** --- 184,204 ---- #if[CAS] @ForceInline static boolean compareAndSet(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) { byte[] ba = (byte[]) oba; + #if[Object] + return UNSAFE.compareAndSetReference( + ba, + address(ba, index(ba, index)), + convEndian(handle.be, expected), convEndian(handle.be, value)); + #else[Object] return UNSAFE.compareAndSet$RawType$( ba, address(ba, index(ba, index)), convEndian(handle.be, expected), convEndian(handle.be, value)); + #end[Object] } @ForceInline static $type$ compareAndExchange(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) { byte[] ba = (byte[]) oba;
*** 259,273 **** --- 266,288 ---- } @ForceInline static $type$ getAndSet(ArrayHandle handle, Object oba, int index, $type$ value) { byte[] ba = (byte[]) oba; + #if[Object] + return convEndian(handle.be, + UNSAFE.getAndSetReference( + ba, + address(ba, index(ba, index)), + convEndian(handle.be, value))); + #else[Object] return convEndian(handle.be, UNSAFE.getAndSet$RawType$( ba, address(ba, index(ba, index)), convEndian(handle.be, value))); + #end[Object] } @ForceInline static $type$ getAndSetAcquire(ArrayHandle handle, Object oba, int index, $type$ value) { byte[] ba = (byte[]) oba;
*** 535,568 **** @ForceInline static $type$ get(ByteBufferHandle handle, Object obb, int index) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); #if[floatingPoint] $rawType$ rawValue = UNSAFE.get$RawType$Unaligned( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), ((long) index(bb, index)) + UNSAFE.getLong(bb, BUFFER_ADDRESS), handle.be); return $Type$.$rawType$BitsTo$Type$(rawValue); #else[floatingPoint] return UNSAFE.get$Type$Unaligned( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), ((long) index(bb, index)) + UNSAFE.getLong(bb, BUFFER_ADDRESS), handle.be); #end[floatingPoint] } @ForceInline static void set(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); #if[floatingPoint] UNSAFE.put$RawType$Unaligned( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), ((long) indexRO(bb, index)) + UNSAFE.getLong(bb, BUFFER_ADDRESS), $Type$.$type$ToRaw$RawType$Bits(value), handle.be); #else[floatingPoint] UNSAFE.put$Type$Unaligned( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), ((long) indexRO(bb, index)) + UNSAFE.getLong(bb, BUFFER_ADDRESS), value, handle.be); #end[floatingPoint] } --- 550,583 ---- @ForceInline static $type$ get(ByteBufferHandle handle, Object obb, int index) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); #if[floatingPoint] $rawType$ rawValue = UNSAFE.get$RawType$Unaligned( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), ((long) index(bb, index)) + UNSAFE.getLong(bb, BUFFER_ADDRESS), handle.be); return $Type$.$rawType$BitsTo$Type$(rawValue); #else[floatingPoint] return UNSAFE.get$Type$Unaligned( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), ((long) index(bb, index)) + UNSAFE.getLong(bb, BUFFER_ADDRESS), handle.be); #end[floatingPoint] } @ForceInline static void set(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); #if[floatingPoint] UNSAFE.put$RawType$Unaligned( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), ((long) indexRO(bb, index)) + UNSAFE.getLong(bb, BUFFER_ADDRESS), $Type$.$type$ToRaw$RawType$Bits(value), handle.be); #else[floatingPoint] UNSAFE.put$Type$Unaligned( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), ((long) indexRO(bb, index)) + UNSAFE.getLong(bb, BUFFER_ADDRESS), value, handle.be); #end[floatingPoint] }
*** 570,730 **** @ForceInline static $type$ getVolatile(ByteBufferHandle handle, Object obb, int index) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return convEndian(handle.be, UNSAFE.get$RawType$Volatile( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, index(bb, index)))); } @ForceInline static void setVolatile(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); UNSAFE.put$RawType$Volatile( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, value)); } @ForceInline static $type$ getAcquire(ByteBufferHandle handle, Object obb, int index) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return convEndian(handle.be, UNSAFE.get$RawType$Acquire( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, index(bb, index)))); } @ForceInline static void setRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); UNSAFE.put$RawType$Release( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, value)); } @ForceInline static $type$ getOpaque(ByteBufferHandle handle, Object obb, int index) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return convEndian(handle.be, UNSAFE.get$RawType$Opaque( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, index(bb, index)))); } @ForceInline static void setOpaque(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); UNSAFE.put$RawType$Opaque( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, value)); } #if[CAS] @ForceInline static boolean compareAndSet(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return UNSAFE.compareAndSet$RawType$( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, expected), convEndian(handle.be, value)); } @ForceInline static $type$ compareAndExchange(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return convEndian(handle.be, UNSAFE.compareAndExchange$RawType$( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, expected), convEndian(handle.be, value))); } @ForceInline static $type$ compareAndExchangeAcquire(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return convEndian(handle.be, UNSAFE.compareAndExchange$RawType$Acquire( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, expected), convEndian(handle.be, value))); } @ForceInline static $type$ compareAndExchangeRelease(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return convEndian(handle.be, UNSAFE.compareAndExchange$RawType$Release( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, expected), convEndian(handle.be, value))); } @ForceInline static boolean weakCompareAndSetPlain(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return UNSAFE.weakCompareAndSet$RawType$Plain( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, expected), convEndian(handle.be, value)); } @ForceInline static boolean weakCompareAndSet(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return UNSAFE.weakCompareAndSet$RawType$( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, expected), convEndian(handle.be, value)); } @ForceInline static boolean weakCompareAndSetAcquire(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return UNSAFE.weakCompareAndSet$RawType$Acquire( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, expected), convEndian(handle.be, value)); } @ForceInline static boolean weakCompareAndSetRelease(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return UNSAFE.weakCompareAndSet$RawType$Release( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, expected), convEndian(handle.be, value)); } @ForceInline static $type$ getAndSet(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return convEndian(handle.be, UNSAFE.getAndSet$RawType$( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, value))); } @ForceInline static $type$ getAndSetAcquire(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return convEndian(handle.be, UNSAFE.getAndSet$RawType$Acquire( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, value))); } @ForceInline static $type$ getAndSetRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return convEndian(handle.be, UNSAFE.getAndSet$RawType$Release( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, value))); } #end[CAS] #if[AtomicAdd] --- 585,760 ---- @ForceInline static $type$ getVolatile(ByteBufferHandle handle, Object obb, int index) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return convEndian(handle.be, UNSAFE.get$RawType$Volatile( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, index(bb, index)))); } @ForceInline static void setVolatile(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); UNSAFE.put$RawType$Volatile( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, value)); } @ForceInline static $type$ getAcquire(ByteBufferHandle handle, Object obb, int index) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return convEndian(handle.be, UNSAFE.get$RawType$Acquire( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, index(bb, index)))); } @ForceInline static void setRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); UNSAFE.put$RawType$Release( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, value)); } @ForceInline static $type$ getOpaque(ByteBufferHandle handle, Object obb, int index) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return convEndian(handle.be, UNSAFE.get$RawType$Opaque( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, index(bb, index)))); } @ForceInline static void setOpaque(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); UNSAFE.put$RawType$Opaque( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, value)); } #if[CAS] @ForceInline static boolean compareAndSet(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); + #if[Object] + return UNSAFE.compareAndSetReference( + UNSAFE.getReference(bb, BYTE_BUFFER_HB), + address(bb, indexRO(bb, index)), + convEndian(handle.be, expected), convEndian(handle.be, value)); + #else[Object] return UNSAFE.compareAndSet$RawType$( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, expected), convEndian(handle.be, value)); + #end[Object] } @ForceInline static $type$ compareAndExchange(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return convEndian(handle.be, UNSAFE.compareAndExchange$RawType$( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, expected), convEndian(handle.be, value))); } @ForceInline static $type$ compareAndExchangeAcquire(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return convEndian(handle.be, UNSAFE.compareAndExchange$RawType$Acquire( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, expected), convEndian(handle.be, value))); } @ForceInline static $type$ compareAndExchangeRelease(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return convEndian(handle.be, UNSAFE.compareAndExchange$RawType$Release( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, expected), convEndian(handle.be, value))); } @ForceInline static boolean weakCompareAndSetPlain(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return UNSAFE.weakCompareAndSet$RawType$Plain( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, expected), convEndian(handle.be, value)); } @ForceInline static boolean weakCompareAndSet(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return UNSAFE.weakCompareAndSet$RawType$( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, expected), convEndian(handle.be, value)); } @ForceInline static boolean weakCompareAndSetAcquire(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return UNSAFE.weakCompareAndSet$RawType$Acquire( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, expected), convEndian(handle.be, value)); } @ForceInline static boolean weakCompareAndSetRelease(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return UNSAFE.weakCompareAndSet$RawType$Release( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, expected), convEndian(handle.be, value)); } @ForceInline static $type$ getAndSet(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); + #if[Object] + return convEndian(handle.be, + UNSAFE.getAndSetReference( + UNSAFE.getReference(bb, BYTE_BUFFER_HB), + address(bb, indexRO(bb, index)), + convEndian(handle.be, value))); + #else[Object] return convEndian(handle.be, UNSAFE.getAndSet$RawType$( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, value))); + #end[Object] } @ForceInline static $type$ getAndSetAcquire(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return convEndian(handle.be, UNSAFE.getAndSet$RawType$Acquire( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, value))); } @ForceInline static $type$ getAndSetRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); return convEndian(handle.be, UNSAFE.getAndSet$RawType$Release( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), convEndian(handle.be, value))); } #end[CAS] #if[AtomicAdd]
*** 732,742 **** @ForceInline static $type$ getAndAdd(ByteBufferHandle handle, Object obb, int index, $type$ delta) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); if (handle.be == BE) { return UNSAFE.getAndAdd$RawType$( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), delta); } else { return getAndAddConvEndianWithCAS(bb, index, delta); } --- 762,772 ---- @ForceInline static $type$ getAndAdd(ByteBufferHandle handle, Object obb, int index, $type$ delta) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); if (handle.be == BE) { return UNSAFE.getAndAdd$RawType$( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), delta); } else { return getAndAddConvEndianWithCAS(bb, index, delta); }
*** 745,755 **** @ForceInline static $type$ getAndAddAcquire(ByteBufferHandle handle, Object obb, int index, $type$ delta) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); if (handle.be == BE) { return UNSAFE.getAndAdd$RawType$Acquire( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), delta); } else { return getAndAddConvEndianWithCAS(bb, index, delta); } --- 775,785 ---- @ForceInline static $type$ getAndAddAcquire(ByteBufferHandle handle, Object obb, int index, $type$ delta) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); if (handle.be == BE) { return UNSAFE.getAndAdd$RawType$Acquire( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), delta); } else { return getAndAddConvEndianWithCAS(bb, index, delta); }
*** 758,779 **** @ForceInline static $type$ getAndAddRelease(ByteBufferHandle handle, Object obb, int index, $type$ delta) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); if (handle.be == BE) { return UNSAFE.getAndAdd$RawType$Release( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), delta); } else { return getAndAddConvEndianWithCAS(bb, index, delta); } } @ForceInline static $type$ getAndAddConvEndianWithCAS(ByteBuffer bb, int index, $type$ delta) { $type$ nativeExpectedValue, expectedValue; ! Object base = UNSAFE.getObject(bb, BYTE_BUFFER_HB); long offset = address(bb, indexRO(bb, index)); do { nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset); expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue); } while (!UNSAFE.weakCompareAndSet$RawType$(base, offset, --- 788,809 ---- @ForceInline static $type$ getAndAddRelease(ByteBufferHandle handle, Object obb, int index, $type$ delta) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); if (handle.be == BE) { return UNSAFE.getAndAdd$RawType$Release( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), delta); } else { return getAndAddConvEndianWithCAS(bb, index, delta); } } @ForceInline static $type$ getAndAddConvEndianWithCAS(ByteBuffer bb, int index, $type$ delta) { $type$ nativeExpectedValue, expectedValue; ! Object base = UNSAFE.getReference(bb, BYTE_BUFFER_HB); long offset = address(bb, indexRO(bb, index)); do { nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset); expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue); } while (!UNSAFE.weakCompareAndSet$RawType$(base, offset,
*** 786,796 **** @ForceInline static $type$ getAndBitwiseOr(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); if (handle.be == BE) { return UNSAFE.getAndBitwiseOr$RawType$( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), value); } else { return getAndBitwiseOrConvEndianWithCAS(bb, index, value); } --- 816,826 ---- @ForceInline static $type$ getAndBitwiseOr(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); if (handle.be == BE) { return UNSAFE.getAndBitwiseOr$RawType$( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), value); } else { return getAndBitwiseOrConvEndianWithCAS(bb, index, value); }
*** 799,809 **** @ForceInline static $type$ getAndBitwiseOrRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); if (handle.be == BE) { return UNSAFE.getAndBitwiseOr$RawType$Release( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), value); } else { return getAndBitwiseOrConvEndianWithCAS(bb, index, value); } --- 829,839 ---- @ForceInline static $type$ getAndBitwiseOrRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); if (handle.be == BE) { return UNSAFE.getAndBitwiseOr$RawType$Release( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), value); } else { return getAndBitwiseOrConvEndianWithCAS(bb, index, value); }
*** 812,833 **** @ForceInline static $type$ getAndBitwiseOrAcquire(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); if (handle.be == BE) { return UNSAFE.getAndBitwiseOr$RawType$Acquire( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), value); } else { return getAndBitwiseOrConvEndianWithCAS(bb, index, value); } } @ForceInline static $type$ getAndBitwiseOrConvEndianWithCAS(ByteBuffer bb, int index, $type$ value) { $type$ nativeExpectedValue, expectedValue; ! Object base = UNSAFE.getObject(bb, BYTE_BUFFER_HB); long offset = address(bb, indexRO(bb, index)); do { nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset); expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue); } while (!UNSAFE.weakCompareAndSet$RawType$(base, offset, --- 842,863 ---- @ForceInline static $type$ getAndBitwiseOrAcquire(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); if (handle.be == BE) { return UNSAFE.getAndBitwiseOr$RawType$Acquire( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), value); } else { return getAndBitwiseOrConvEndianWithCAS(bb, index, value); } } @ForceInline static $type$ getAndBitwiseOrConvEndianWithCAS(ByteBuffer bb, int index, $type$ value) { $type$ nativeExpectedValue, expectedValue; ! Object base = UNSAFE.getReference(bb, BYTE_BUFFER_HB); long offset = address(bb, indexRO(bb, index)); do { nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset); expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue); } while (!UNSAFE.weakCompareAndSet$RawType$(base, offset,
*** 838,848 **** @ForceInline static $type$ getAndBitwiseAnd(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); if (handle.be == BE) { return UNSAFE.getAndBitwiseAnd$RawType$( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), value); } else { return getAndBitwiseAndConvEndianWithCAS(bb, index, value); } --- 868,878 ---- @ForceInline static $type$ getAndBitwiseAnd(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); if (handle.be == BE) { return UNSAFE.getAndBitwiseAnd$RawType$( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), value); } else { return getAndBitwiseAndConvEndianWithCAS(bb, index, value); }
*** 851,861 **** @ForceInline static $type$ getAndBitwiseAndRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); if (handle.be == BE) { return UNSAFE.getAndBitwiseAnd$RawType$Release( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), value); } else { return getAndBitwiseAndConvEndianWithCAS(bb, index, value); } --- 881,891 ---- @ForceInline static $type$ getAndBitwiseAndRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); if (handle.be == BE) { return UNSAFE.getAndBitwiseAnd$RawType$Release( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), value); } else { return getAndBitwiseAndConvEndianWithCAS(bb, index, value); }
*** 864,885 **** @ForceInline static $type$ getAndBitwiseAndAcquire(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); if (handle.be == BE) { return UNSAFE.getAndBitwiseAnd$RawType$Acquire( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), value); } else { return getAndBitwiseAndConvEndianWithCAS(bb, index, value); } } @ForceInline static $type$ getAndBitwiseAndConvEndianWithCAS(ByteBuffer bb, int index, $type$ value) { $type$ nativeExpectedValue, expectedValue; ! Object base = UNSAFE.getObject(bb, BYTE_BUFFER_HB); long offset = address(bb, indexRO(bb, index)); do { nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset); expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue); } while (!UNSAFE.weakCompareAndSet$RawType$(base, offset, --- 894,915 ---- @ForceInline static $type$ getAndBitwiseAndAcquire(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); if (handle.be == BE) { return UNSAFE.getAndBitwiseAnd$RawType$Acquire( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), value); } else { return getAndBitwiseAndConvEndianWithCAS(bb, index, value); } } @ForceInline static $type$ getAndBitwiseAndConvEndianWithCAS(ByteBuffer bb, int index, $type$ value) { $type$ nativeExpectedValue, expectedValue; ! Object base = UNSAFE.getReference(bb, BYTE_BUFFER_HB); long offset = address(bb, indexRO(bb, index)); do { nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset); expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue); } while (!UNSAFE.weakCompareAndSet$RawType$(base, offset,
*** 891,901 **** @ForceInline static $type$ getAndBitwiseXor(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); if (handle.be == BE) { return UNSAFE.getAndBitwiseXor$RawType$( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), value); } else { return getAndBitwiseXorConvEndianWithCAS(bb, index, value); } --- 921,931 ---- @ForceInline static $type$ getAndBitwiseXor(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); if (handle.be == BE) { return UNSAFE.getAndBitwiseXor$RawType$( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), value); } else { return getAndBitwiseXorConvEndianWithCAS(bb, index, value); }
*** 904,914 **** @ForceInline static $type$ getAndBitwiseXorRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); if (handle.be == BE) { return UNSAFE.getAndBitwiseXor$RawType$Release( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), value); } else { return getAndBitwiseXorConvEndianWithCAS(bb, index, value); } --- 934,944 ---- @ForceInline static $type$ getAndBitwiseXorRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); if (handle.be == BE) { return UNSAFE.getAndBitwiseXor$RawType$Release( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), value); } else { return getAndBitwiseXorConvEndianWithCAS(bb, index, value); }
*** 917,938 **** @ForceInline static $type$ getAndBitwiseXorAcquire(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); if (handle.be == BE) { return UNSAFE.getAndBitwiseXor$RawType$Acquire( ! UNSAFE.getObject(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), value); } else { return getAndBitwiseXorConvEndianWithCAS(bb, index, value); } } @ForceInline static $type$ getAndBitwiseXorConvEndianWithCAS(ByteBuffer bb, int index, $type$ value) { $type$ nativeExpectedValue, expectedValue; ! Object base = UNSAFE.getObject(bb, BYTE_BUFFER_HB); long offset = address(bb, indexRO(bb, index)); do { nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset); expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue); } while (!UNSAFE.weakCompareAndSet$RawType$(base, offset, --- 947,968 ---- @ForceInline static $type$ getAndBitwiseXorAcquire(ByteBufferHandle handle, Object obb, int index, $type$ value) { ByteBuffer bb = (ByteBuffer) Objects.requireNonNull(obb); if (handle.be == BE) { return UNSAFE.getAndBitwiseXor$RawType$Acquire( ! UNSAFE.getReference(bb, BYTE_BUFFER_HB), address(bb, indexRO(bb, index)), value); } else { return getAndBitwiseXorConvEndianWithCAS(bb, index, value); } } @ForceInline static $type$ getAndBitwiseXorConvEndianWithCAS(ByteBuffer bb, int index, $type$ value) { $type$ nativeExpectedValue, expectedValue; ! Object base = UNSAFE.getReference(bb, BYTE_BUFFER_HB); long offset = address(bb, indexRO(bb, index)); do { nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset); expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue); } while (!UNSAFE.weakCompareAndSet$RawType$(base, offset,
< prev index next >