8162108: Rename weakCompareAndSetVolatile to weakCompareAndSet
Reviewed-by: martin
--- a/jdk/src/java.base/share/classes/java/lang/invoke/VarHandle.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/VarHandle.java Thu Sep 01 13:56:13 2016 -0700
@@ -134,8 +134,8 @@
* The set of corresponding access mode methods belonging to this group
* consists of the methods
* {@link #compareAndSet compareAndSet},
+ * {@link #weakCompareAndSetPlain weakCompareAndSetPlain},
* {@link #weakCompareAndSet weakCompareAndSet},
- * {@link #weakCompareAndSetVolatile weakCompareAndSetVolatile},
* {@link #weakCompareAndSetAcquire weakCompareAndSetAcquire},
* {@link #weakCompareAndSetRelease weakCompareAndSetRelease},
* {@link #compareAndExchangeAcquire compareAndExchangeAcquire},
@@ -834,8 +834,8 @@
* <p>The method signature is of the form {@code (CT, T expectedValue, T newValue)boolean}.
*
* <p>The symbolic type descriptor at the call site of {@code
- * weakCompareAndSet} must match the access mode type that is the result of
- * calling {@code accessModeType(VarHandle.AccessMode.WEAK_COMPARE_AND_SET)}
+ * weakCompareAndSetPlain} must match the access mode type that is the result of
+ * calling {@code accessModeType(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN)}
* on this VarHandle.
*
* @param args the signature-polymorphic parameter list of the form
@@ -856,7 +856,7 @@
public final native
@MethodHandle.PolymorphicSignature
@HotSpotIntrinsicCandidate
- boolean weakCompareAndSet(Object... args);
+ boolean weakCompareAndSetPlain(Object... args);
/**
* Possibly atomically sets the value of a variable to the {@code newValue}
@@ -871,8 +871,8 @@
* <p>The method signature is of the form {@code (CT, T expectedValue, T newValue)boolean}.
*
* <p>The symbolic type descriptor at the call site of {@code
- * weakCompareAndSetVolatile} must match the access mode type that is the
- * result of calling {@code accessModeType(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE)}
+ * weakCompareAndSet} must match the access mode type that is the
+ * result of calling {@code accessModeType(VarHandle.AccessMode.WEAK_COMPARE_AND_SET)}
* on this VarHandle.
*
* @param args the signature-polymorphic parameter list of the form
@@ -893,7 +893,7 @@
public final native
@MethodHandle.PolymorphicSignature
@HotSpotIntrinsicCandidate
- boolean weakCompareAndSetVolatile(Object... args);
+ boolean weakCompareAndSet(Object... args);
/**
* Possibly atomically sets the value of a variable to the {@code newValue}
@@ -1658,18 +1658,18 @@
/**
* The access mode whose access is specified by the corresponding
* method
+ * {@link VarHandle#weakCompareAndSetPlain VarHandle.weakCompareAndSetPlain}
+ */
+ WEAK_COMPARE_AND_SET_PLAIN("weakCompareAndSetPlain", AccessType.COMPARE_AND_SWAP),
+ /**
+ * The access mode whose access is specified by the corresponding
+ * method
* {@link VarHandle#weakCompareAndSet VarHandle.weakCompareAndSet}
*/
WEAK_COMPARE_AND_SET("weakCompareAndSet", AccessType.COMPARE_AND_SWAP),
/**
* The access mode whose access is specified by the corresponding
* method
- * {@link VarHandle#weakCompareAndSetVolatile VarHandle.weakCompareAndSetVolatile}
- */
- WEAK_COMPARE_AND_SET_VOLATILE("weakCompareAndSetVolatile", AccessType.COMPARE_AND_SWAP),
- /**
- * The access mode whose access is specified by the corresponding
- * method
* {@link VarHandle#weakCompareAndSetAcquire VarHandle.weakCompareAndSetAcquire}
*/
WEAK_COMPARE_AND_SET_ACQUIRE("weakCompareAndSetAcquire", AccessType.COMPARE_AND_SWAP),
--- a/jdk/src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template Thu Sep 01 13:56:13 2016 -0700
@@ -156,7 +156,7 @@
}
@ForceInline
- static boolean weakCompareAndSet(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
+ static boolean weakCompareAndSetPlain(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
return UNSAFE.weakCompareAndSwap$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
{#if[Object]?handle.fieldType.cast(expected):expected},
@@ -164,7 +164,7 @@
}
@ForceInline
- static boolean weakCompareAndSetVolatile(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
+ static boolean weakCompareAndSet(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
return UNSAFE.weakCompareAndSwap$Type$Volatile(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
{#if[Object]?handle.fieldType.cast(expected):expected},
@@ -424,7 +424,7 @@
}
@ForceInline
- static boolean weakCompareAndSet(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
+ static boolean weakCompareAndSetPlain(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
return UNSAFE.weakCompareAndSwap$Type$(handle.base,
handle.fieldOffset,
{#if[Object]?handle.fieldType.cast(expected):expected},
@@ -432,7 +432,7 @@
}
@ForceInline
- static boolean weakCompareAndSetVolatile(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
+ static boolean weakCompareAndSet(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
return UNSAFE.weakCompareAndSwap$Type$Volatile(handle.base,
handle.fieldOffset,
{#if[Object]?handle.fieldType.cast(expected):expected},
@@ -735,7 +735,7 @@
}
@ForceInline
- static boolean weakCompareAndSet(Array handle, Object oarray, int index, $type$ expected, $type$ value) {
+ static boolean weakCompareAndSetPlain(Array handle, Object oarray, int index, $type$ expected, $type$ value) {
#if[Object]
Object[] array = (Object[]) handle.arrayType.cast(oarray);
#else[Object]
@@ -748,7 +748,7 @@
}
@ForceInline
- static boolean weakCompareAndSetVolatile(Array handle, Object oarray, int index, $type$ expected, $type$ value) {
+ static boolean weakCompareAndSet(Array handle, Object oarray, int index, $type$ expected, $type$ value) {
#if[Object]
Object[] array = (Object[]) handle.arrayType.cast(oarray);
#else[Object]
--- a/jdk/src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template Thu Sep 01 13:56:13 2016 -0700
@@ -223,7 +223,7 @@
}
@ForceInline
- static boolean weakCompareAndSet(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
+ static boolean weakCompareAndSetPlain(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
byte[] ba = (byte[]) oba;
return UNSAFE.weakCompareAndSwap$RawType$(
ba,
@@ -232,7 +232,7 @@
}
@ForceInline
- static boolean weakCompareAndSetVolatile(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
+ static boolean weakCompareAndSet(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
byte[] ba = (byte[]) oba;
return UNSAFE.weakCompareAndSwap$RawType$Volatile(
ba,
@@ -662,7 +662,7 @@
}
@ForceInline
- static boolean weakCompareAndSet(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
+ static boolean weakCompareAndSetPlain(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
ByteBuffer bb = (ByteBuffer) obb;
return UNSAFE.weakCompareAndSwap$RawType$(
UNSAFE.getObject(bb, BYTE_BUFFER_HB),
@@ -671,7 +671,7 @@
}
@ForceInline
- static boolean weakCompareAndSetVolatile(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
+ static boolean weakCompareAndSet(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
ByteBuffer bb = (ByteBuffer) obb;
return UNSAFE.weakCompareAndSwap$RawType$Volatile(
UNSAFE.getObject(bb, BYTE_BUFFER_HB),
--- a/jdk/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java Thu Sep 01 13:56:13 2016 -0700
@@ -521,7 +521,7 @@
else
break;
}
- else if (STACK.weakCompareAndSetVolatile(this, p, (p = p.next)))
+ else if (STACK.weakCompareAndSet(this, p, (p = p.next)))
unlinked = true;
else
p = stack;
@@ -532,7 +532,7 @@
if (q.isLive()) {
p = q;
q = s;
- } else if (NEXT.weakCompareAndSetVolatile(p, q, s))
+ } else if (NEXT.weakCompareAndSet(p, q, s))
break;
else
q = p.next;
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java Thu Sep 01 13:56:13 2016 -0700
@@ -330,7 +330,7 @@
// for e to become an element of this deque,
// and for newNode to become "live".
if (p != h) // hop two nodes at a time; failure is OK
- HEAD.weakCompareAndSetVolatile(this, h, newNode);
+ HEAD.weakCompareAndSet(this, h, newNode);
return;
}
// Lost CAS race to another thread; re-read prev
@@ -362,7 +362,7 @@
// for e to become an element of this deque,
// and for newNode to become "live".
if (p != t) // hop two nodes at a time; failure is OK
- TAIL.weakCompareAndSetVolatile(this, t, newNode);
+ TAIL.weakCompareAndSet(this, t, newNode);
return;
}
// Lost CAS race to another thread; re-read next
@@ -1153,12 +1153,12 @@
if (NEXT.compareAndSet(p, null, beginningOfTheEnd)) {
// Successful CAS is the linearization point
// for all elements to be added to this deque.
- if (!TAIL.weakCompareAndSetVolatile(this, t, last)) {
+ if (!TAIL.weakCompareAndSet(this, t, last)) {
// Try a little harder to update tail,
// since we may be adding many elements.
t = tail;
if (last.next == null)
- TAIL.weakCompareAndSetVolatile(this, t, last);
+ TAIL.weakCompareAndSet(this, t, last);
}
return true;
}
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java Thu Sep 01 13:56:13 2016 -0700
@@ -308,7 +308,7 @@
// for e to become an element of this queue,
// and for newNode to become "live".
if (p != t) // hop two nodes at a time; failure is OK
- TAIL.weakCompareAndSetVolatile(this, t, newNode);
+ TAIL.weakCompareAndSet(this, t, newNode);
return true;
}
// Lost CAS race to another thread; re-read next
@@ -477,7 +477,7 @@
next = succ(p);
if (pred != null && next != null) // unlink
- NEXT.weakCompareAndSetVolatile(pred, p, next);
+ NEXT.weakCompareAndSet(pred, p, next);
if (removed)
return true;
}
@@ -524,12 +524,12 @@
if (NEXT.compareAndSet(p, null, beginningOfTheEnd)) {
// Successful CAS is the linearization point
// for all elements to be added to this queue.
- if (!TAIL.weakCompareAndSetVolatile(this, t, last)) {
+ if (!TAIL.weakCompareAndSet(this, t, last)) {
// Try a little harder to update tail,
// since we may be adding many elements.
t = tail;
if (last.next == null)
- TAIL.weakCompareAndSetVolatile(this, t, last);
+ TAIL.weakCompareAndSet(this, t, last);
}
return true;
}
--- a/jdk/src/java.base/share/classes/java/util/concurrent/CountedCompleter.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/CountedCompleter.java Thu Sep 01 13:56:13 2016 -0700
@@ -551,7 +551,7 @@
public final int decrementPendingCountUnlessZero() {
int c;
do {} while ((c = pending) != 0 &&
- !PENDING.weakCompareAndSetVolatile(this, c, c - 1));
+ !PENDING.weakCompareAndSet(this, c, c - 1));
return c;
}
@@ -584,7 +584,7 @@
return;
}
}
- else if (PENDING.weakCompareAndSetVolatile(a, c, c - 1))
+ else if (PENDING.weakCompareAndSet(a, c, c - 1))
return;
}
}
@@ -607,7 +607,7 @@
return;
}
}
- else if (PENDING.weakCompareAndSetVolatile(a, c, c - 1))
+ else if (PENDING.weakCompareAndSet(a, c, c - 1))
return;
}
}
@@ -652,7 +652,7 @@
for (int c;;) {
if ((c = pending) == 0)
return this;
- else if (PENDING.weakCompareAndSetVolatile(this, c, c - 1))
+ else if (PENDING.weakCompareAndSet(this, c, c - 1))
return null;
}
}
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java Thu Sep 01 13:56:13 2016 -0700
@@ -42,15 +42,10 @@
import java.security.Permissions;
import java.security.ProtectionDomain;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.function.Predicate;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.CountedCompleter;
-import java.util.concurrent.ForkJoinTask;
-import java.util.concurrent.ForkJoinWorkerThread;
import java.util.concurrent.locks.LockSupport;
/**
@@ -1413,7 +1408,7 @@
}
if (phase != QUIET) { // else pre-adjusted
long c; // decrement counts
- do {} while (!CTL.weakCompareAndSetVolatile
+ do {} while (!CTL.weakCompareAndSet
(this, c = ctl, ((RC_MASK & (c - RC_UNIT)) |
(TC_MASK & (c - TC_UNIT)) |
(SP_MASK & c))));
@@ -1608,7 +1603,7 @@
do {
w.stackPred = (int)(c = ctl);
nc = ((c - RC_UNIT) & UC_MASK) | (SP_MASK & np);
- } while (!CTL.weakCompareAndSetVolatile(this, c, nc));
+ } while (!CTL.weakCompareAndSet(this, c, nc));
}
else { // already queued
int pred = w.stackPred;
--- a/jdk/src/java.base/share/classes/java/util/concurrent/FutureTask.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/FutureTask.java Thu Sep 01 13:56:13 2016 -0700
@@ -361,7 +361,7 @@
private void finishCompletion() {
// assert state > COMPLETING;
for (WaitNode q; (q = waiters) != null;) {
- if (WAITERS.weakCompareAndSetVolatile(this, q, null)) {
+ if (WAITERS.weakCompareAndSet(this, q, null)) {
for (;;) {
Thread t = q.thread;
if (t != null) {
@@ -423,7 +423,7 @@
q = new WaitNode();
}
else if (!queued)
- queued = WAITERS.weakCompareAndSetVolatile(this, q.next = waiters, q);
+ queued = WAITERS.weakCompareAndSet(this, q.next = waiters, q);
else if (timed) {
final long parkNanos;
if (startTime == 0L) { // first time
--- a/jdk/src/java.base/share/classes/java/util/concurrent/Phaser.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/Phaser.java Thu Sep 01 13:56:13 2016 -0700
@@ -456,7 +456,7 @@
// finish registration whenever parent registration
// succeeded, even when racing with termination,
// since these are part of the same "transaction".
- while (!STATE.weakCompareAndSetVolatile
+ while (!STATE.weakCompareAndSet
(this, s,
((long)phase << PHASE_SHIFT) | adjust)) {
s = state;
@@ -488,7 +488,7 @@
// CAS to root phase with current parties, tripping unarrived
while ((phase = (int)(root.state >>> PHASE_SHIFT)) !=
(int)(s >>> PHASE_SHIFT) &&
- !STATE.weakCompareAndSetVolatile
+ !STATE.weakCompareAndSet
(this, s,
s = (((long)phase << PHASE_SHIFT) |
((phase < 0) ? (s & COUNTS_MASK) :
--- a/jdk/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java Thu Sep 01 13:56:13 2016 -0700
@@ -1203,7 +1203,7 @@
} catch (RuntimeException | Error ex) { // back out
do {} while (((c = ctl) & DISABLED) == 0 &&
(c & ACTIVE) != 0 &&
- !CTL.weakCompareAndSetVolatile
+ !CTL.weakCompareAndSet
(this, c, c & ~ACTIVE));
throw ex;
}
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java Thu Sep 01 13:56:13 2016 -0700
@@ -106,16 +106,16 @@
/**
* Possibly atomically sets the value to {@code newValue}
* if the current value {@code == expectedValue},
- * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+ * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
*
* @param expectedValue the expected value
* @param newValue the new value
* @return {@code true} if successful
*/
public boolean weakCompareAndSet(boolean expectedValue, boolean newValue) {
- return VALUE.weakCompareAndSet(this,
- (expectedValue ? 1 : 0),
- (newValue ? 1 : 0));
+ return VALUE.weakCompareAndSetPlain(this,
+ (expectedValue ? 1 : 0),
+ (newValue ? 1 : 0));
}
/**
@@ -285,7 +285,7 @@
* Possibly atomically sets the value to {@code newValue} if the current
* value {@code == expectedValue},
* with memory effects as specified by
- * {@link VarHandle#weakCompareAndSetVolatile}.
+ * {@link VarHandle#weakCompareAndSet}.
*
* @param expectedValue the expected value
* @param newValue the new value
@@ -293,9 +293,9 @@
* @since 9
*/
public final boolean weakCompareAndSetVolatile(boolean expectedValue, boolean newValue) {
- return VALUE.weakCompareAndSetVolatile(this,
- (expectedValue ? 1 : 0),
- (newValue ? 1 : 0));
+ return VALUE.weakCompareAndSet(this,
+ (expectedValue ? 1 : 0),
+ (newValue ? 1 : 0));
}
/**
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java Thu Sep 01 13:56:13 2016 -0700
@@ -146,7 +146,7 @@
/**
* Possibly atomically sets the value to {@code newValue}
* if the current value {@code == expectedValue},
- * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+ * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
*
* @param expectedValue the expected value
* @param newValue the new value
@@ -490,7 +490,7 @@
* Possibly atomically sets the value to {@code newValue} if
* the current value {@code == expectedValue},
* with memory effects as specified by
- * {@link VarHandle#weakCompareAndSetVolatile}.
+ * {@link VarHandle#weakCompareAndSet}.
*
* @param expectedValue the expected value
* @param newValue the new value
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java Thu Sep 01 13:56:13 2016 -0700
@@ -149,7 +149,7 @@
/**
* Possibly atomically sets the element at index {@code i} to
* {@code newValue} if the element's current value {@code == expectedValue},
- * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+ * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
*
* @param i the index
* @param expectedValue the expected value
@@ -157,7 +157,7 @@
* @return {@code true} if successful
*/
public final boolean weakCompareAndSet(int i, int expectedValue, int newValue) {
- return AA.weakCompareAndSet(array, i, expectedValue, newValue);
+ return AA.weakCompareAndSetPlain(array, i, expectedValue, newValue);
}
/**
@@ -489,7 +489,7 @@
* Possibly atomically sets the element at index {@code i} to
* {@code newValue} if the element's current value {@code == expectedValue},
* with memory effects as specified by
- * {@link VarHandle#weakCompareAndSetVolatile}.
+ * {@link VarHandle#weakCompareAndSet}.
*
* @param i the index
* @param expectedValue the expected value
@@ -498,7 +498,7 @@
* @since 9
*/
public final boolean weakCompareAndSetVolatile(int i, int expectedValue, int newValue) {
- return AA.weakCompareAndSetVolatile(array, i, expectedValue, newValue);
+ return AA.weakCompareAndSet(array, i, expectedValue, newValue);
}
/**
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java Thu Sep 01 13:56:13 2016 -0700
@@ -162,7 +162,7 @@
/**
* Possibly atomically sets the value to {@code newValue}
* if the current value {@code == expectedValue},
- * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+ * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
*
* @param expectedValue the expected value
* @param newValue the new value
@@ -504,7 +504,7 @@
* Possibly atomically sets the value to {@code newValue}
* if the current value {@code == expectedValue},
* with memory effects as specified by
- * {@link VarHandle#weakCompareAndSetVolatile}.
+ * {@link VarHandle#weakCompareAndSet}.
*
* @param expectedValue the expected value
* @param newValue the new value
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java Thu Sep 01 13:56:13 2016 -0700
@@ -149,7 +149,7 @@
/**
* Possibly atomically sets the element at index {@code i} to
* {@code newValue} if the element's current value {@code == expectedValue},
- * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+ * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
*
* @param i the index
* @param expectedValue the expected value
@@ -157,7 +157,7 @@
* @return {@code true} if successful
*/
public final boolean weakCompareAndSet(int i, long expectedValue, long newValue) {
- return AA.weakCompareAndSet(array, i, expectedValue, newValue);
+ return AA.weakCompareAndSetPlain(array, i, expectedValue, newValue);
}
/**
@@ -489,7 +489,7 @@
* Possibly atomically sets the element at index {@code i} to
* {@code newValue} if the element's current value {@code == expectedValue},
* with memory effects as specified by
- * {@link VarHandle#weakCompareAndSetVolatile}.
+ * {@link VarHandle#weakCompareAndSet}.
*
* @param i the index
* @param expectedValue the expected value
@@ -498,7 +498,7 @@
* @since 9
*/
public final boolean weakCompareAndSetVolatile(int i, long expectedValue, long newValue) {
- return AA.weakCompareAndSetVolatile(array, i, expectedValue, newValue);
+ return AA.weakCompareAndSet(array, i, expectedValue, newValue);
}
/**
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java Thu Sep 01 13:56:13 2016 -0700
@@ -125,14 +125,14 @@
/**
* Possibly atomically sets the value to {@code newValue}
* if the current value {@code == expectedValue},
- * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+ * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
*
* @param expectedValue the expected value
* @param newValue the new value
* @return {@code true} if successful
*/
public final boolean weakCompareAndSet(V expectedValue, V newValue) {
- return VALUE.weakCompareAndSet(this, expectedValue, newValue);
+ return VALUE.weakCompareAndSetPlain(this, expectedValue, newValue);
}
/**
@@ -370,7 +370,7 @@
* Possibly atomically sets the value to {@code newValue}
* if the current value {@code == expectedValue},
* with memory effects as specified by
- * {@link VarHandle#weakCompareAndSetVolatile}.
+ * {@link VarHandle#weakCompareAndSet}.
*
* @param expectedValue the expected value
* @param newValue the new value
@@ -378,7 +378,7 @@
* @since 9
*/
public final boolean weakCompareAndSetVolatile(V expectedValue, V newValue) {
- return VALUE.weakCompareAndSetVolatile(this, expectedValue, newValue);
+ return VALUE.weakCompareAndSet(this, expectedValue, newValue);
}
/**
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java Thu Sep 01 13:56:13 2016 -0700
@@ -155,7 +155,7 @@
/**
* Possibly atomically sets the element at index {@code i} to
* {@code newValue} if the element's current value {@code == expectedValue},
- * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+ * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
*
* @param i the index
* @param expectedValue the expected value
@@ -163,7 +163,7 @@
* @return {@code true} if successful
*/
public final boolean weakCompareAndSet(int i, E expectedValue, E newValue) {
- return AA.weakCompareAndSet(array, i, expectedValue, newValue);
+ return AA.weakCompareAndSetPlain(array, i, expectedValue, newValue);
}
/**
@@ -451,7 +451,7 @@
* Possibly atomically sets the element at index {@code i} to
* {@code newValue} if the element's current value {@code == expectedValue},
* with memory effects as specified by
- * {@link VarHandle#weakCompareAndSetVolatile}.
+ * {@link VarHandle#weakCompareAndSet}.
*
* @param i the index
* @param expectedValue the expected value
@@ -460,7 +460,7 @@
* @since 9
*/
public final boolean weakCompareAndSetVolatile(int i, E expectedValue, E newValue) {
- return AA.weakCompareAndSetVolatile(array, i, expectedValue, newValue);
+ return AA.weakCompareAndSet(array, i, expectedValue, newValue);
}
/**
--- a/jdk/src/java.base/share/classes/java/util/concurrent/locks/StampedLock.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/locks/StampedLock.java Thu Sep 01 13:56:13 2016 -0700
@@ -1123,14 +1123,14 @@
}
else if ((p = wtail) == null) { // initialize queue
WNode hd = new WNode(WMODE, null);
- if (WHEAD.weakCompareAndSetVolatile(this, null, hd))
+ if (WHEAD.weakCompareAndSet(this, null, hd))
wtail = hd;
}
else if (node == null)
node = new WNode(WMODE, p);
else if (node.prev != p)
node.prev = p;
- else if (WTAIL.weakCompareAndSetVolatile(this, p, node)) {
+ else if (WTAIL.weakCompareAndSet(this, p, node)) {
p.next = node;
break;
}
@@ -1162,7 +1162,7 @@
else if (h != null) { // help release stale waiters
WNode c; Thread w;
while ((c = h.cowait) != null) {
- if (WCOWAIT.weakCompareAndSetVolatile(h, c, c.cowait) &&
+ if (WCOWAIT.weakCompareAndSet(h, c, c.cowait) &&
(w = c.thread) != null)
LockSupport.unpark(w);
}
@@ -1247,7 +1247,7 @@
}
if (p == null) { // initialize queue
WNode hd = new WNode(WMODE, null);
- if (WHEAD.weakCompareAndSetVolatile(this, null, hd))
+ if (WHEAD.weakCompareAndSet(this, null, hd))
wtail = hd;
}
else if (node == null)
@@ -1255,7 +1255,7 @@
else if (h == p || p.mode != RMODE) {
if (node.prev != p)
node.prev = p;
- else if (WTAIL.weakCompareAndSetVolatile(this, p, node)) {
+ else if (WTAIL.weakCompareAndSet(this, p, node)) {
p.next = node;
break;
}
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleBaseTest.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleBaseTest.java Thu Sep 01 13:56:13 2016 -0700
@@ -149,8 +149,8 @@
COMPARE_AND_EXCHANGE(TestAccessType.COMPARE_AND_EXCHANGE),
COMPARE_AND_EXCHANGE_ACQUIRE(TestAccessType.COMPARE_AND_EXCHANGE),
COMPARE_AND_EXCHANGE_RELEASE(TestAccessType.COMPARE_AND_EXCHANGE),
+ WEAK_COMPARE_AND_SET_PLAIN(TestAccessType.COMPARE_AND_SET),
WEAK_COMPARE_AND_SET(TestAccessType.COMPARE_AND_SET),
- WEAK_COMPARE_AND_SET_VOLATILE(TestAccessType.COMPARE_AND_SET),
WEAK_COMPARE_AND_SET_ACQUIRE(TestAccessType.COMPARE_AND_SET),
WEAK_COMPARE_AND_SET_RELEASE(TestAccessType.COMPARE_AND_SET),
GET_AND_SET(TestAccessType.GET_AND_SET),
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessBoolean.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessBoolean.java Thu Sep 01 13:56:13 2016 -0700
@@ -103,8 +103,8 @@
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+ assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
- assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
@@ -441,11 +441,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(recv, true, false);
+ success = vh.weakCompareAndSetPlain(recv, true, false);
}
- assertEquals(success, true, "weakCompareAndSet boolean");
+ assertEquals(success, true, "weakCompareAndSetPlain boolean");
boolean x = (boolean) vh.get(recv);
- assertEquals(x, false, "weakCompareAndSet boolean value");
+ assertEquals(x, false, "weakCompareAndSetPlain boolean value");
}
{
@@ -471,11 +471,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetVolatile(recv, false, true);
+ success = vh.weakCompareAndSet(recv, false, true);
}
- assertEquals(success, true, "weakCompareAndSetVolatile boolean");
+ assertEquals(success, true, "weakCompareAndSet boolean");
boolean x = (boolean) vh.get(recv);
- assertEquals(x, true, "weakCompareAndSetVolatile boolean value");
+ assertEquals(x, true, "weakCompareAndSet boolean value");
}
// Compare set and get
@@ -701,11 +701,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(true, false);
+ success = vh.weakCompareAndSetPlain(true, false);
}
- assertEquals(success, true, "weakCompareAndSet boolean");
+ assertEquals(success, true, "weakCompareAndSetPlain boolean");
boolean x = (boolean) vh.get();
- assertEquals(x, false, "weakCompareAndSet boolean value");
+ assertEquals(x, false, "weakCompareAndSetPlain boolean value");
}
{
@@ -731,11 +731,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetRelease(false, true);
+ success = vh.weakCompareAndSet(false, true);
}
- assertEquals(success, true, "weakCompareAndSetVolatile boolean");
+ assertEquals(success, true, "weakCompareAndSet boolean");
boolean x = (boolean) vh.get();
- assertEquals(x, true, "weakCompareAndSetVolatile boolean");
+ assertEquals(x, true, "weakCompareAndSet boolean");
}
// Compare set and get
@@ -964,11 +964,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(array, i, true, false);
+ success = vh.weakCompareAndSetPlain(array, i, true, false);
}
- assertEquals(success, true, "weakCompareAndSet boolean");
+ assertEquals(success, true, "weakCompareAndSetPlain boolean");
boolean x = (boolean) vh.get(array, i);
- assertEquals(x, false, "weakCompareAndSet boolean value");
+ assertEquals(x, false, "weakCompareAndSetPlain boolean value");
}
{
@@ -994,11 +994,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetVolatile(array, i, false, true);
+ success = vh.weakCompareAndSet(array, i, false, true);
}
- assertEquals(success, true, "weakCompareAndSetVolatile boolean");
+ assertEquals(success, true, "weakCompareAndSet boolean");
boolean x = (boolean) vh.get(array, i);
- assertEquals(x, true, "weakCompareAndSetVolatile boolean");
+ assertEquals(x, true, "weakCompareAndSet boolean");
}
// Compare set and get
@@ -1190,11 +1190,11 @@
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, true, false);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, true, false);
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, true, false);
+ boolean r = vh.weakCompareAndSet(array, ci, true, false);
});
checkIOOBE(() -> {
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessByte.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessByte.java Thu Sep 01 13:56:13 2016 -0700
@@ -103,8 +103,8 @@
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+ assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
- assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
@@ -419,11 +419,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(recv, (byte)0x01, (byte)0x23);
+ success = vh.weakCompareAndSetPlain(recv, (byte)0x01, (byte)0x23);
}
- assertEquals(success, true, "weakCompareAndSet byte");
+ assertEquals(success, true, "weakCompareAndSetPlain byte");
byte x = (byte) vh.get(recv);
- assertEquals(x, (byte)0x23, "weakCompareAndSet byte value");
+ assertEquals(x, (byte)0x23, "weakCompareAndSetPlain byte value");
}
{
@@ -449,11 +449,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetVolatile(recv, (byte)0x23, (byte)0x01);
+ success = vh.weakCompareAndSet(recv, (byte)0x23, (byte)0x01);
}
- assertEquals(success, true, "weakCompareAndSetVolatile byte");
+ assertEquals(success, true, "weakCompareAndSet byte");
byte x = (byte) vh.get(recv);
- assertEquals(x, (byte)0x01, "weakCompareAndSetVolatile byte value");
+ assertEquals(x, (byte)0x01, "weakCompareAndSet byte value");
}
// Compare set and get
@@ -695,11 +695,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet((byte)0x01, (byte)0x23);
+ success = vh.weakCompareAndSetPlain((byte)0x01, (byte)0x23);
}
- assertEquals(success, true, "weakCompareAndSet byte");
+ assertEquals(success, true, "weakCompareAndSetPlain byte");
byte x = (byte) vh.get();
- assertEquals(x, (byte)0x23, "weakCompareAndSet byte value");
+ assertEquals(x, (byte)0x23, "weakCompareAndSetPlain byte value");
}
{
@@ -725,11 +725,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetRelease((byte)0x23, (byte)0x01);
+ success = vh.weakCompareAndSet((byte)0x23, (byte)0x01);
}
- assertEquals(success, true, "weakCompareAndSetVolatile byte");
+ assertEquals(success, true, "weakCompareAndSet byte");
byte x = (byte) vh.get();
- assertEquals(x, (byte)0x01, "weakCompareAndSetVolatile byte");
+ assertEquals(x, (byte)0x01, "weakCompareAndSet byte");
}
// Compare set and get
@@ -974,11 +974,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(array, i, (byte)0x01, (byte)0x23);
+ success = vh.weakCompareAndSetPlain(array, i, (byte)0x01, (byte)0x23);
}
- assertEquals(success, true, "weakCompareAndSet byte");
+ assertEquals(success, true, "weakCompareAndSetPlain byte");
byte x = (byte) vh.get(array, i);
- assertEquals(x, (byte)0x23, "weakCompareAndSet byte value");
+ assertEquals(x, (byte)0x23, "weakCompareAndSetPlain byte value");
}
{
@@ -1004,11 +1004,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetVolatile(array, i, (byte)0x23, (byte)0x01);
+ success = vh.weakCompareAndSet(array, i, (byte)0x23, (byte)0x01);
}
- assertEquals(success, true, "weakCompareAndSetVolatile byte");
+ assertEquals(success, true, "weakCompareAndSet byte");
byte x = (byte) vh.get(array, i);
- assertEquals(x, (byte)0x01, "weakCompareAndSetVolatile byte");
+ assertEquals(x, (byte)0x01, "weakCompareAndSet byte");
}
// Compare set and get
@@ -1216,11 +1216,11 @@
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, (byte)0x01, (byte)0x23);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, (byte)0x01, (byte)0x23);
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, (byte)0x01, (byte)0x23);
+ boolean r = vh.weakCompareAndSet(array, ci, (byte)0x01, (byte)0x23);
});
checkIOOBE(() -> {
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessChar.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessChar.java Thu Sep 01 13:56:13 2016 -0700
@@ -103,8 +103,8 @@
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+ assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
- assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
@@ -419,11 +419,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(recv, '\u0123', '\u4567');
+ success = vh.weakCompareAndSetPlain(recv, '\u0123', '\u4567');
}
- assertEquals(success, true, "weakCompareAndSet char");
+ assertEquals(success, true, "weakCompareAndSetPlain char");
char x = (char) vh.get(recv);
- assertEquals(x, '\u4567', "weakCompareAndSet char value");
+ assertEquals(x, '\u4567', "weakCompareAndSetPlain char value");
}
{
@@ -449,11 +449,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetVolatile(recv, '\u4567', '\u0123');
+ success = vh.weakCompareAndSet(recv, '\u4567', '\u0123');
}
- assertEquals(success, true, "weakCompareAndSetVolatile char");
+ assertEquals(success, true, "weakCompareAndSet char");
char x = (char) vh.get(recv);
- assertEquals(x, '\u0123', "weakCompareAndSetVolatile char value");
+ assertEquals(x, '\u0123', "weakCompareAndSet char value");
}
// Compare set and get
@@ -695,11 +695,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet('\u0123', '\u4567');
+ success = vh.weakCompareAndSetPlain('\u0123', '\u4567');
}
- assertEquals(success, true, "weakCompareAndSet char");
+ assertEquals(success, true, "weakCompareAndSetPlain char");
char x = (char) vh.get();
- assertEquals(x, '\u4567', "weakCompareAndSet char value");
+ assertEquals(x, '\u4567', "weakCompareAndSetPlain char value");
}
{
@@ -725,11 +725,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetRelease('\u4567', '\u0123');
+ success = vh.weakCompareAndSet('\u4567', '\u0123');
}
- assertEquals(success, true, "weakCompareAndSetVolatile char");
+ assertEquals(success, true, "weakCompareAndSet char");
char x = (char) vh.get();
- assertEquals(x, '\u0123', "weakCompareAndSetVolatile char");
+ assertEquals(x, '\u0123', "weakCompareAndSet char");
}
// Compare set and get
@@ -974,11 +974,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(array, i, '\u0123', '\u4567');
+ success = vh.weakCompareAndSetPlain(array, i, '\u0123', '\u4567');
}
- assertEquals(success, true, "weakCompareAndSet char");
+ assertEquals(success, true, "weakCompareAndSetPlain char");
char x = (char) vh.get(array, i);
- assertEquals(x, '\u4567', "weakCompareAndSet char value");
+ assertEquals(x, '\u4567', "weakCompareAndSetPlain char value");
}
{
@@ -1004,11 +1004,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetVolatile(array, i, '\u4567', '\u0123');
+ success = vh.weakCompareAndSet(array, i, '\u4567', '\u0123');
}
- assertEquals(success, true, "weakCompareAndSetVolatile char");
+ assertEquals(success, true, "weakCompareAndSet char");
char x = (char) vh.get(array, i);
- assertEquals(x, '\u0123', "weakCompareAndSetVolatile char");
+ assertEquals(x, '\u0123', "weakCompareAndSet char");
}
// Compare set and get
@@ -1216,11 +1216,11 @@
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, '\u0123', '\u4567');
+ boolean r = vh.weakCompareAndSetPlain(array, ci, '\u0123', '\u4567');
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, '\u0123', '\u4567');
+ boolean r = vh.weakCompareAndSet(array, ci, '\u0123', '\u4567');
});
checkIOOBE(() -> {
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessDouble.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessDouble.java Thu Sep 01 13:56:13 2016 -0700
@@ -103,8 +103,8 @@
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+ assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
- assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
@@ -489,11 +489,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(recv, 1.0d, 2.0d);
+ success = vh.weakCompareAndSetPlain(recv, 1.0d, 2.0d);
}
- assertEquals(success, true, "weakCompareAndSet double");
+ assertEquals(success, true, "weakCompareAndSetPlain double");
double x = (double) vh.get(recv);
- assertEquals(x, 2.0d, "weakCompareAndSet double value");
+ assertEquals(x, 2.0d, "weakCompareAndSetPlain double value");
}
{
@@ -519,11 +519,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetVolatile(recv, 2.0d, 1.0d);
+ success = vh.weakCompareAndSet(recv, 2.0d, 1.0d);
}
- assertEquals(success, true, "weakCompareAndSetVolatile double");
+ assertEquals(success, true, "weakCompareAndSet double");
double x = (double) vh.get(recv);
- assertEquals(x, 1.0d, "weakCompareAndSetVolatile double value");
+ assertEquals(x, 1.0d, "weakCompareAndSet double value");
}
// Compare set and get
@@ -717,11 +717,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(1.0d, 2.0d);
+ success = vh.weakCompareAndSetPlain(1.0d, 2.0d);
}
- assertEquals(success, true, "weakCompareAndSet double");
+ assertEquals(success, true, "weakCompareAndSetPlain double");
double x = (double) vh.get();
- assertEquals(x, 2.0d, "weakCompareAndSet double value");
+ assertEquals(x, 2.0d, "weakCompareAndSetPlain double value");
}
{
@@ -747,11 +747,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetRelease(2.0d, 1.0d);
+ success = vh.weakCompareAndSet(2.0d, 1.0d);
}
- assertEquals(success, true, "weakCompareAndSetVolatile double");
+ assertEquals(success, true, "weakCompareAndSet double");
double x = (double) vh.get();
- assertEquals(x, 1.0d, "weakCompareAndSetVolatile double");
+ assertEquals(x, 1.0d, "weakCompareAndSet double");
}
// Compare set and get
@@ -948,11 +948,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(array, i, 1.0d, 2.0d);
+ success = vh.weakCompareAndSetPlain(array, i, 1.0d, 2.0d);
}
- assertEquals(success, true, "weakCompareAndSet double");
+ assertEquals(success, true, "weakCompareAndSetPlain double");
double x = (double) vh.get(array, i);
- assertEquals(x, 2.0d, "weakCompareAndSet double value");
+ assertEquals(x, 2.0d, "weakCompareAndSetPlain double value");
}
{
@@ -978,11 +978,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetVolatile(array, i, 2.0d, 1.0d);
+ success = vh.weakCompareAndSet(array, i, 2.0d, 1.0d);
}
- assertEquals(success, true, "weakCompareAndSetVolatile double");
+ assertEquals(success, true, "weakCompareAndSet double");
double x = (double) vh.get(array, i);
- assertEquals(x, 1.0d, "weakCompareAndSetVolatile double");
+ assertEquals(x, 1.0d, "weakCompareAndSet double");
}
// Compare set and get
@@ -1142,11 +1142,11 @@
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, 1.0d, 2.0d);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, 1.0d, 2.0d);
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, 1.0d, 2.0d);
+ boolean r = vh.weakCompareAndSet(array, ci, 1.0d, 2.0d);
});
checkIOOBE(() -> {
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessFloat.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessFloat.java Thu Sep 01 13:56:13 2016 -0700
@@ -103,8 +103,8 @@
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+ assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
- assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
@@ -489,11 +489,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(recv, 1.0f, 2.0f);
+ success = vh.weakCompareAndSetPlain(recv, 1.0f, 2.0f);
}
- assertEquals(success, true, "weakCompareAndSet float");
+ assertEquals(success, true, "weakCompareAndSetPlain float");
float x = (float) vh.get(recv);
- assertEquals(x, 2.0f, "weakCompareAndSet float value");
+ assertEquals(x, 2.0f, "weakCompareAndSetPlain float value");
}
{
@@ -519,11 +519,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetVolatile(recv, 2.0f, 1.0f);
+ success = vh.weakCompareAndSet(recv, 2.0f, 1.0f);
}
- assertEquals(success, true, "weakCompareAndSetVolatile float");
+ assertEquals(success, true, "weakCompareAndSet float");
float x = (float) vh.get(recv);
- assertEquals(x, 1.0f, "weakCompareAndSetVolatile float value");
+ assertEquals(x, 1.0f, "weakCompareAndSet float value");
}
// Compare set and get
@@ -717,11 +717,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(1.0f, 2.0f);
+ success = vh.weakCompareAndSetPlain(1.0f, 2.0f);
}
- assertEquals(success, true, "weakCompareAndSet float");
+ assertEquals(success, true, "weakCompareAndSetPlain float");
float x = (float) vh.get();
- assertEquals(x, 2.0f, "weakCompareAndSet float value");
+ assertEquals(x, 2.0f, "weakCompareAndSetPlain float value");
}
{
@@ -747,11 +747,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetRelease(2.0f, 1.0f);
+ success = vh.weakCompareAndSet(2.0f, 1.0f);
}
- assertEquals(success, true, "weakCompareAndSetVolatile float");
+ assertEquals(success, true, "weakCompareAndSet float");
float x = (float) vh.get();
- assertEquals(x, 1.0f, "weakCompareAndSetVolatile float");
+ assertEquals(x, 1.0f, "weakCompareAndSet float");
}
// Compare set and get
@@ -948,11 +948,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(array, i, 1.0f, 2.0f);
+ success = vh.weakCompareAndSetPlain(array, i, 1.0f, 2.0f);
}
- assertEquals(success, true, "weakCompareAndSet float");
+ assertEquals(success, true, "weakCompareAndSetPlain float");
float x = (float) vh.get(array, i);
- assertEquals(x, 2.0f, "weakCompareAndSet float value");
+ assertEquals(x, 2.0f, "weakCompareAndSetPlain float value");
}
{
@@ -978,11 +978,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetVolatile(array, i, 2.0f, 1.0f);
+ success = vh.weakCompareAndSet(array, i, 2.0f, 1.0f);
}
- assertEquals(success, true, "weakCompareAndSetVolatile float");
+ assertEquals(success, true, "weakCompareAndSet float");
float x = (float) vh.get(array, i);
- assertEquals(x, 1.0f, "weakCompareAndSetVolatile float");
+ assertEquals(x, 1.0f, "weakCompareAndSet float");
}
// Compare set and get
@@ -1142,11 +1142,11 @@
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, 1.0f, 2.0f);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, 1.0f, 2.0f);
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, 1.0f, 2.0f);
+ boolean r = vh.weakCompareAndSet(array, ci, 1.0f, 2.0f);
});
checkIOOBE(() -> {
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessInt.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessInt.java Thu Sep 01 13:56:13 2016 -0700
@@ -103,8 +103,8 @@
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+ assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
- assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
@@ -419,11 +419,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(recv, 0x01234567, 0x89ABCDEF);
+ success = vh.weakCompareAndSetPlain(recv, 0x01234567, 0x89ABCDEF);
}
- assertEquals(success, true, "weakCompareAndSet int");
+ assertEquals(success, true, "weakCompareAndSetPlain int");
int x = (int) vh.get(recv);
- assertEquals(x, 0x89ABCDEF, "weakCompareAndSet int value");
+ assertEquals(x, 0x89ABCDEF, "weakCompareAndSetPlain int value");
}
{
@@ -449,11 +449,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetVolatile(recv, 0x89ABCDEF, 0x01234567);
+ success = vh.weakCompareAndSet(recv, 0x89ABCDEF, 0x01234567);
}
- assertEquals(success, true, "weakCompareAndSetVolatile int");
+ assertEquals(success, true, "weakCompareAndSet int");
int x = (int) vh.get(recv);
- assertEquals(x, 0x01234567, "weakCompareAndSetVolatile int value");
+ assertEquals(x, 0x01234567, "weakCompareAndSet int value");
}
// Compare set and get
@@ -695,11 +695,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(0x01234567, 0x89ABCDEF);
+ success = vh.weakCompareAndSetPlain(0x01234567, 0x89ABCDEF);
}
- assertEquals(success, true, "weakCompareAndSet int");
+ assertEquals(success, true, "weakCompareAndSetPlain int");
int x = (int) vh.get();
- assertEquals(x, 0x89ABCDEF, "weakCompareAndSet int value");
+ assertEquals(x, 0x89ABCDEF, "weakCompareAndSetPlain int value");
}
{
@@ -725,11 +725,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetRelease(0x89ABCDEF, 0x01234567);
+ success = vh.weakCompareAndSet(0x89ABCDEF, 0x01234567);
}
- assertEquals(success, true, "weakCompareAndSetVolatile int");
+ assertEquals(success, true, "weakCompareAndSet int");
int x = (int) vh.get();
- assertEquals(x, 0x01234567, "weakCompareAndSetVolatile int");
+ assertEquals(x, 0x01234567, "weakCompareAndSet int");
}
// Compare set and get
@@ -974,11 +974,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(array, i, 0x01234567, 0x89ABCDEF);
+ success = vh.weakCompareAndSetPlain(array, i, 0x01234567, 0x89ABCDEF);
}
- assertEquals(success, true, "weakCompareAndSet int");
+ assertEquals(success, true, "weakCompareAndSetPlain int");
int x = (int) vh.get(array, i);
- assertEquals(x, 0x89ABCDEF, "weakCompareAndSet int value");
+ assertEquals(x, 0x89ABCDEF, "weakCompareAndSetPlain int value");
}
{
@@ -1004,11 +1004,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetVolatile(array, i, 0x89ABCDEF, 0x01234567);
+ success = vh.weakCompareAndSet(array, i, 0x89ABCDEF, 0x01234567);
}
- assertEquals(success, true, "weakCompareAndSetVolatile int");
+ assertEquals(success, true, "weakCompareAndSet int");
int x = (int) vh.get(array, i);
- assertEquals(x, 0x01234567, "weakCompareAndSetVolatile int");
+ assertEquals(x, 0x01234567, "weakCompareAndSet int");
}
// Compare set and get
@@ -1216,11 +1216,11 @@
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, 0x01234567, 0x89ABCDEF);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, 0x01234567, 0x89ABCDEF);
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, 0x01234567, 0x89ABCDEF);
+ boolean r = vh.weakCompareAndSet(array, ci, 0x01234567, 0x89ABCDEF);
});
checkIOOBE(() -> {
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessLong.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessLong.java Thu Sep 01 13:56:13 2016 -0700
@@ -103,8 +103,8 @@
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+ assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
- assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
@@ -419,11 +419,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(recv, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
+ success = vh.weakCompareAndSetPlain(recv, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
}
- assertEquals(success, true, "weakCompareAndSet long");
+ assertEquals(success, true, "weakCompareAndSetPlain long");
long x = (long) vh.get(recv);
- assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSet long value");
+ assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSetPlain long value");
}
{
@@ -449,11 +449,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetVolatile(recv, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL);
+ success = vh.weakCompareAndSet(recv, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL);
}
- assertEquals(success, true, "weakCompareAndSetVolatile long");
+ assertEquals(success, true, "weakCompareAndSet long");
long x = (long) vh.get(recv);
- assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSetVolatile long value");
+ assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSet long value");
}
// Compare set and get
@@ -695,11 +695,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
+ success = vh.weakCompareAndSetPlain(0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
}
- assertEquals(success, true, "weakCompareAndSet long");
+ assertEquals(success, true, "weakCompareAndSetPlain long");
long x = (long) vh.get();
- assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSet long value");
+ assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSetPlain long value");
}
{
@@ -725,11 +725,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetRelease(0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL);
+ success = vh.weakCompareAndSet(0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL);
}
- assertEquals(success, true, "weakCompareAndSetVolatile long");
+ assertEquals(success, true, "weakCompareAndSet long");
long x = (long) vh.get();
- assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSetVolatile long");
+ assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSet long");
}
// Compare set and get
@@ -974,11 +974,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(array, i, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
+ success = vh.weakCompareAndSetPlain(array, i, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
}
- assertEquals(success, true, "weakCompareAndSet long");
+ assertEquals(success, true, "weakCompareAndSetPlain long");
long x = (long) vh.get(array, i);
- assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSet long value");
+ assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSetPlain long value");
}
{
@@ -1004,11 +1004,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetVolatile(array, i, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL);
+ success = vh.weakCompareAndSet(array, i, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL);
}
- assertEquals(success, true, "weakCompareAndSetVolatile long");
+ assertEquals(success, true, "weakCompareAndSet long");
long x = (long) vh.get(array, i);
- assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSetVolatile long");
+ assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSet long");
}
// Compare set and get
@@ -1216,11 +1216,11 @@
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
+ boolean r = vh.weakCompareAndSet(array, ci, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
});
checkIOOBE(() -> {
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessShort.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessShort.java Thu Sep 01 13:56:13 2016 -0700
@@ -103,8 +103,8 @@
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+ assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
- assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
@@ -419,11 +419,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(recv, (short)0x0123, (short)0x4567);
+ success = vh.weakCompareAndSetPlain(recv, (short)0x0123, (short)0x4567);
}
- assertEquals(success, true, "weakCompareAndSet short");
+ assertEquals(success, true, "weakCompareAndSetPlain short");
short x = (short) vh.get(recv);
- assertEquals(x, (short)0x4567, "weakCompareAndSet short value");
+ assertEquals(x, (short)0x4567, "weakCompareAndSetPlain short value");
}
{
@@ -449,11 +449,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetVolatile(recv, (short)0x4567, (short)0x0123);
+ success = vh.weakCompareAndSet(recv, (short)0x4567, (short)0x0123);
}
- assertEquals(success, true, "weakCompareAndSetVolatile short");
+ assertEquals(success, true, "weakCompareAndSet short");
short x = (short) vh.get(recv);
- assertEquals(x, (short)0x0123, "weakCompareAndSetVolatile short value");
+ assertEquals(x, (short)0x0123, "weakCompareAndSet short value");
}
// Compare set and get
@@ -695,11 +695,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet((short)0x0123, (short)0x4567);
+ success = vh.weakCompareAndSetPlain((short)0x0123, (short)0x4567);
}
- assertEquals(success, true, "weakCompareAndSet short");
+ assertEquals(success, true, "weakCompareAndSetPlain short");
short x = (short) vh.get();
- assertEquals(x, (short)0x4567, "weakCompareAndSet short value");
+ assertEquals(x, (short)0x4567, "weakCompareAndSetPlain short value");
}
{
@@ -725,11 +725,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetRelease((short)0x4567, (short)0x0123);
+ success = vh.weakCompareAndSet((short)0x4567, (short)0x0123);
}
- assertEquals(success, true, "weakCompareAndSetVolatile short");
+ assertEquals(success, true, "weakCompareAndSet short");
short x = (short) vh.get();
- assertEquals(x, (short)0x0123, "weakCompareAndSetVolatile short");
+ assertEquals(x, (short)0x0123, "weakCompareAndSet short");
}
// Compare set and get
@@ -974,11 +974,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(array, i, (short)0x0123, (short)0x4567);
+ success = vh.weakCompareAndSetPlain(array, i, (short)0x0123, (short)0x4567);
}
- assertEquals(success, true, "weakCompareAndSet short");
+ assertEquals(success, true, "weakCompareAndSetPlain short");
short x = (short) vh.get(array, i);
- assertEquals(x, (short)0x4567, "weakCompareAndSet short value");
+ assertEquals(x, (short)0x4567, "weakCompareAndSetPlain short value");
}
{
@@ -1004,11 +1004,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetVolatile(array, i, (short)0x4567, (short)0x0123);
+ success = vh.weakCompareAndSet(array, i, (short)0x4567, (short)0x0123);
}
- assertEquals(success, true, "weakCompareAndSetVolatile short");
+ assertEquals(success, true, "weakCompareAndSet short");
short x = (short) vh.get(array, i);
- assertEquals(x, (short)0x0123, "weakCompareAndSetVolatile short");
+ assertEquals(x, (short)0x0123, "weakCompareAndSet short");
}
// Compare set and get
@@ -1216,11 +1216,11 @@
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, (short)0x0123, (short)0x4567);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, (short)0x0123, (short)0x4567);
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, (short)0x0123, (short)0x4567);
+ boolean r = vh.weakCompareAndSet(array, ci, (short)0x0123, (short)0x4567);
});
checkIOOBE(() -> {
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessString.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessString.java Thu Sep 01 13:56:13 2016 -0700
@@ -103,8 +103,8 @@
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+ assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
- assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
@@ -511,11 +511,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(recv, "foo", "bar");
+ success = vh.weakCompareAndSetPlain(recv, "foo", "bar");
}
- assertEquals(success, true, "weakCompareAndSet String");
+ assertEquals(success, true, "weakCompareAndSetPlain String");
String x = (String) vh.get(recv);
- assertEquals(x, "bar", "weakCompareAndSet String value");
+ assertEquals(x, "bar", "weakCompareAndSetPlain String value");
}
{
@@ -541,11 +541,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetVolatile(recv, "bar", "foo");
+ success = vh.weakCompareAndSet(recv, "bar", "foo");
}
- assertEquals(success, true, "weakCompareAndSetVolatile String");
+ assertEquals(success, true, "weakCompareAndSet String");
String x = (String) vh.get(recv);
- assertEquals(x, "foo", "weakCompareAndSetVolatile String value");
+ assertEquals(x, "foo", "weakCompareAndSet String value");
}
// Compare set and get
@@ -723,11 +723,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet("foo", "bar");
+ success = vh.weakCompareAndSetPlain("foo", "bar");
}
- assertEquals(success, true, "weakCompareAndSet String");
+ assertEquals(success, true, "weakCompareAndSetPlain String");
String x = (String) vh.get();
- assertEquals(x, "bar", "weakCompareAndSet String value");
+ assertEquals(x, "bar", "weakCompareAndSetPlain String value");
}
{
@@ -753,11 +753,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetRelease("bar", "foo");
+ success = vh.weakCompareAndSet("bar", "foo");
}
- assertEquals(success, true, "weakCompareAndSetVolatile String");
+ assertEquals(success, true, "weakCompareAndSet String");
String x = (String) vh.get();
- assertEquals(x, "foo", "weakCompareAndSetVolatile String");
+ assertEquals(x, "foo", "weakCompareAndSet String");
}
// Compare set and get
@@ -938,11 +938,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(array, i, "foo", "bar");
+ success = vh.weakCompareAndSetPlain(array, i, "foo", "bar");
}
- assertEquals(success, true, "weakCompareAndSet String");
+ assertEquals(success, true, "weakCompareAndSetPlain String");
String x = (String) vh.get(array, i);
- assertEquals(x, "bar", "weakCompareAndSet String value");
+ assertEquals(x, "bar", "weakCompareAndSetPlain String value");
}
{
@@ -968,11 +968,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetVolatile(array, i, "bar", "foo");
+ success = vh.weakCompareAndSet(array, i, "bar", "foo");
}
- assertEquals(success, true, "weakCompareAndSetVolatile String");
+ assertEquals(success, true, "weakCompareAndSet String");
String x = (String) vh.get(array, i);
- assertEquals(x, "foo", "weakCompareAndSetVolatile String");
+ assertEquals(x, "foo", "weakCompareAndSet String");
}
// Compare set and get
@@ -1116,11 +1116,11 @@
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, "foo", "bar");
+ boolean r = vh.weakCompareAndSetPlain(array, ci, "foo", "bar");
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, "foo", "bar");
+ boolean r = vh.weakCompareAndSet(array, ci, "foo", "bar");
});
checkIOOBE(() -> {
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsChar.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsChar.java Thu Sep 01 13:56:13 2016 -0700
@@ -92,8 +92,8 @@
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+ assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
- assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
@@ -214,11 +214,11 @@
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkUOE(() -> {
@@ -331,11 +331,11 @@
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkUOE(() -> {
@@ -424,11 +424,11 @@
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkUOE(() -> {
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsDouble.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsDouble.java Thu Sep 01 13:56:13 2016 -0700
@@ -92,8 +92,8 @@
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+ assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
- assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
@@ -289,11 +289,11 @@
});
checkROBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkROBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkROBE(() -> {
@@ -473,11 +473,11 @@
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkIOOBE(() -> {
@@ -567,11 +567,11 @@
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkIOOBE(() -> {
@@ -652,11 +652,11 @@
});
checkISE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkISE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkISE(() -> {
@@ -739,11 +739,11 @@
});
checkISE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkISE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkISE(() -> {
@@ -875,11 +875,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(array, i, VALUE_1, VALUE_2);
+ success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2);
}
- assertEquals(success, true, "weakCompareAndSet double");
+ assertEquals(success, true, "weakCompareAndSetPlain double");
double x = (double) vh.get(array, i);
- assertEquals(x, VALUE_2, "weakCompareAndSet double value");
+ assertEquals(x, VALUE_2, "weakCompareAndSetPlain double value");
}
{
@@ -903,10 +903,13 @@
}
{
- boolean r = vh.weakCompareAndSetVolatile(array, i, VALUE_2, VALUE_1);
- assertEquals(r, true, "weakCompareAndSetVolatile double");
+ boolean success = false;
+ for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
+ success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1);
+ }
+ assertEquals(success, true, "weakCompareAndSet double");
double x = (double) vh.get(array, i);
- assertEquals(x, VALUE_1, "weakCompareAndSetVolatile double value");
+ assertEquals(x, VALUE_1, "weakCompareAndSet double");
}
// Compare set and get
@@ -1045,11 +1048,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(array, i, VALUE_1, VALUE_2);
+ success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2);
}
- assertEquals(success, true, "weakCompareAndSet double");
+ assertEquals(success, true, "weakCompareAndSetPlain double");
double x = (double) vh.get(array, i);
- assertEquals(x, VALUE_2, "weakCompareAndSet double value");
+ assertEquals(x, VALUE_2, "weakCompareAndSetPlain double value");
}
{
@@ -1073,10 +1076,13 @@
}
{
- boolean r = vh.weakCompareAndSetVolatile(array, i, VALUE_2, VALUE_1);
- assertEquals(r, true, "weakCompareAndSetVolatile double");
+ boolean success = false;
+ for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
+ success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1);
+ }
+ assertEquals(success, true, "weakCompareAndSet double");
double x = (double) vh.get(array, i);
- assertEquals(x, VALUE_1, "weakCompareAndSetVolatile double value");
+ assertEquals(x, VALUE_1, "weakCompareAndSet double");
}
// Compare set and get
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsFloat.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsFloat.java Thu Sep 01 13:56:13 2016 -0700
@@ -92,8 +92,8 @@
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+ assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
- assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
@@ -289,11 +289,11 @@
});
checkROBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkROBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkROBE(() -> {
@@ -473,11 +473,11 @@
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkIOOBE(() -> {
@@ -567,11 +567,11 @@
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkIOOBE(() -> {
@@ -652,11 +652,11 @@
});
checkISE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkISE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkISE(() -> {
@@ -739,11 +739,11 @@
});
checkISE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkISE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkISE(() -> {
@@ -875,11 +875,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(array, i, VALUE_1, VALUE_2);
+ success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2);
}
- assertEquals(success, true, "weakCompareAndSet float");
+ assertEquals(success, true, "weakCompareAndSetPlain float");
float x = (float) vh.get(array, i);
- assertEquals(x, VALUE_2, "weakCompareAndSet float value");
+ assertEquals(x, VALUE_2, "weakCompareAndSetPlain float value");
}
{
@@ -903,10 +903,13 @@
}
{
- boolean r = vh.weakCompareAndSetVolatile(array, i, VALUE_2, VALUE_1);
- assertEquals(r, true, "weakCompareAndSetVolatile float");
+ boolean success = false;
+ for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
+ success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1);
+ }
+ assertEquals(success, true, "weakCompareAndSet float");
float x = (float) vh.get(array, i);
- assertEquals(x, VALUE_1, "weakCompareAndSetVolatile float value");
+ assertEquals(x, VALUE_1, "weakCompareAndSet float");
}
// Compare set and get
@@ -1045,11 +1048,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(array, i, VALUE_1, VALUE_2);
+ success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2);
}
- assertEquals(success, true, "weakCompareAndSet float");
+ assertEquals(success, true, "weakCompareAndSetPlain float");
float x = (float) vh.get(array, i);
- assertEquals(x, VALUE_2, "weakCompareAndSet float value");
+ assertEquals(x, VALUE_2, "weakCompareAndSetPlain float value");
}
{
@@ -1073,10 +1076,13 @@
}
{
- boolean r = vh.weakCompareAndSetVolatile(array, i, VALUE_2, VALUE_1);
- assertEquals(r, true, "weakCompareAndSetVolatile float");
+ boolean success = false;
+ for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
+ success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1);
+ }
+ assertEquals(success, true, "weakCompareAndSet float");
float x = (float) vh.get(array, i);
- assertEquals(x, VALUE_1, "weakCompareAndSetVolatile float value");
+ assertEquals(x, VALUE_1, "weakCompareAndSet float");
}
// Compare set and get
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsInt.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsInt.java Thu Sep 01 13:56:13 2016 -0700
@@ -92,8 +92,8 @@
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+ assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
- assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
@@ -243,11 +243,11 @@
});
checkROBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkROBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkROBE(() -> {
@@ -381,11 +381,11 @@
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkIOOBE(() -> {
@@ -521,11 +521,11 @@
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkIOOBE(() -> {
@@ -652,11 +652,11 @@
});
checkISE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkISE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkISE(() -> {
@@ -785,11 +785,11 @@
});
checkISE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkISE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkISE(() -> {
@@ -967,11 +967,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(array, i, VALUE_1, VALUE_2);
+ success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2);
}
- assertEquals(success, true, "weakCompareAndSet int");
+ assertEquals(success, true, "weakCompareAndSetPlain int");
int x = (int) vh.get(array, i);
- assertEquals(x, VALUE_2, "weakCompareAndSet int value");
+ assertEquals(x, VALUE_2, "weakCompareAndSetPlain int value");
}
{
@@ -995,10 +995,13 @@
}
{
- boolean r = vh.weakCompareAndSetVolatile(array, i, VALUE_2, VALUE_1);
- assertEquals(r, true, "weakCompareAndSetVolatile int");
+ boolean success = false;
+ for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
+ success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1);
+ }
+ assertEquals(success, true, "weakCompareAndSet int");
int x = (int) vh.get(array, i);
- assertEquals(x, VALUE_1, "weakCompareAndSetVolatile int value");
+ assertEquals(x, VALUE_1, "weakCompareAndSet int");
}
// Compare set and get
@@ -1247,11 +1250,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(array, i, VALUE_1, VALUE_2);
+ success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2);
}
- assertEquals(success, true, "weakCompareAndSet int");
+ assertEquals(success, true, "weakCompareAndSetPlain int");
int x = (int) vh.get(array, i);
- assertEquals(x, VALUE_2, "weakCompareAndSet int value");
+ assertEquals(x, VALUE_2, "weakCompareAndSetPlain int value");
}
{
@@ -1275,10 +1278,13 @@
}
{
- boolean r = vh.weakCompareAndSetVolatile(array, i, VALUE_2, VALUE_1);
- assertEquals(r, true, "weakCompareAndSetVolatile int");
+ boolean success = false;
+ for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
+ success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1);
+ }
+ assertEquals(success, true, "weakCompareAndSet int");
int x = (int) vh.get(array, i);
- assertEquals(x, VALUE_1, "weakCompareAndSetVolatile int value");
+ assertEquals(x, VALUE_1, "weakCompareAndSet int");
}
// Compare set and get
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsLong.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsLong.java Thu Sep 01 13:56:13 2016 -0700
@@ -92,8 +92,8 @@
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+ assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
- assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
@@ -243,11 +243,11 @@
});
checkROBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkROBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkROBE(() -> {
@@ -381,11 +381,11 @@
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkIOOBE(() -> {
@@ -521,11 +521,11 @@
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkIOOBE(() -> {
@@ -652,11 +652,11 @@
});
checkISE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkISE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkISE(() -> {
@@ -785,11 +785,11 @@
});
checkISE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkISE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkISE(() -> {
@@ -967,11 +967,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(array, i, VALUE_1, VALUE_2);
+ success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2);
}
- assertEquals(success, true, "weakCompareAndSet long");
+ assertEquals(success, true, "weakCompareAndSetPlain long");
long x = (long) vh.get(array, i);
- assertEquals(x, VALUE_2, "weakCompareAndSet long value");
+ assertEquals(x, VALUE_2, "weakCompareAndSetPlain long value");
}
{
@@ -995,10 +995,13 @@
}
{
- boolean r = vh.weakCompareAndSetVolatile(array, i, VALUE_2, VALUE_1);
- assertEquals(r, true, "weakCompareAndSetVolatile long");
+ boolean success = false;
+ for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
+ success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1);
+ }
+ assertEquals(success, true, "weakCompareAndSet long");
long x = (long) vh.get(array, i);
- assertEquals(x, VALUE_1, "weakCompareAndSetVolatile long value");
+ assertEquals(x, VALUE_1, "weakCompareAndSet long");
}
// Compare set and get
@@ -1247,11 +1250,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(array, i, VALUE_1, VALUE_2);
+ success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2);
}
- assertEquals(success, true, "weakCompareAndSet long");
+ assertEquals(success, true, "weakCompareAndSetPlain long");
long x = (long) vh.get(array, i);
- assertEquals(x, VALUE_2, "weakCompareAndSet long value");
+ assertEquals(x, VALUE_2, "weakCompareAndSetPlain long value");
}
{
@@ -1275,10 +1278,13 @@
}
{
- boolean r = vh.weakCompareAndSetVolatile(array, i, VALUE_2, VALUE_1);
- assertEquals(r, true, "weakCompareAndSetVolatile long");
+ boolean success = false;
+ for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
+ success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1);
+ }
+ assertEquals(success, true, "weakCompareAndSet long");
long x = (long) vh.get(array, i);
- assertEquals(x, VALUE_1, "weakCompareAndSetVolatile long value");
+ assertEquals(x, VALUE_1, "weakCompareAndSet long");
}
// Compare set and get
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsShort.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsShort.java Thu Sep 01 13:56:13 2016 -0700
@@ -92,8 +92,8 @@
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+ assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
- assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
@@ -214,11 +214,11 @@
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkUOE(() -> {
@@ -331,11 +331,11 @@
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkUOE(() -> {
@@ -424,11 +424,11 @@
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkUOE(() -> {
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessBoolean.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessBoolean.java Thu Sep 01 13:56:13 2016 -0700
@@ -210,11 +210,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, true, false);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, true, false);
}
- assertEquals(success, true, "weakCompareAndSet boolean");
+ assertEquals(success, true, "weakCompareAndSetPlain boolean");
boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(recv);
- assertEquals(x, false, "weakCompareAndSet boolean value");
+ assertEquals(x, false, "weakCompareAndSetPlain boolean value");
}
{
@@ -240,11 +240,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(recv, false, true);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, false, true);
}
- assertEquals(success, true, "weakCompareAndSetVolatile boolean");
+ assertEquals(success, true, "weakCompareAndSet boolean");
boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(recv);
- assertEquals(x, true, "weakCompareAndSetVolatile boolean");
+ assertEquals(x, true, "weakCompareAndSet boolean");
}
// Compare set and get
@@ -444,11 +444,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(true, false);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(true, false);
}
- assertEquals(success, true, "weakCompareAndSet boolean");
+ assertEquals(success, true, "weakCompareAndSetPlain boolean");
boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact();
- assertEquals(x, false, "weakCompareAndSet boolean value");
+ assertEquals(x, false, "weakCompareAndSetPlain boolean value");
}
{
@@ -474,11 +474,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(false, true);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(false, true);
}
- assertEquals(success, true, "weakCompareAndSetVolatile boolean");
+ assertEquals(success, true, "weakCompareAndSet boolean");
boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact();
- assertEquals(x, true, "weakCompareAndSetVolatile boolean");
+ assertEquals(x, true, "weakCompareAndSet boolean");
}
// Compare set and get
@@ -703,11 +703,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, true, false);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, true, false);
}
- assertEquals(success, true, "weakCompareAndSet boolean");
+ assertEquals(success, true, "weakCompareAndSetPlain boolean");
boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(array, i);
- assertEquals(x, false, "weakCompareAndSet boolean value");
+ assertEquals(x, false, "weakCompareAndSetPlain boolean value");
}
{
@@ -733,11 +733,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(array, i, false, true);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, false, true);
}
- assertEquals(success, true, "weakCompareAndSetVolatile boolean");
+ assertEquals(success, true, "weakCompareAndSet boolean");
boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(array, i);
- assertEquals(x, true, "weakCompareAndSetVolatile boolean");
+ assertEquals(x, true, "weakCompareAndSet boolean");
}
// Compare set and get
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessByte.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessByte.java Thu Sep 01 13:56:13 2016 -0700
@@ -210,11 +210,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, (byte)0x01, (byte)0x23);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, (byte)0x01, (byte)0x23);
}
- assertEquals(success, true, "weakCompareAndSet byte");
+ assertEquals(success, true, "weakCompareAndSetPlain byte");
byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(recv);
- assertEquals(x, (byte)0x23, "weakCompareAndSet byte value");
+ assertEquals(x, (byte)0x23, "weakCompareAndSetPlain byte value");
}
{
@@ -240,11 +240,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(recv, (byte)0x23, (byte)0x01);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, (byte)0x23, (byte)0x01);
}
- assertEquals(success, true, "weakCompareAndSetVolatile byte");
+ assertEquals(success, true, "weakCompareAndSet byte");
byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(recv);
- assertEquals(x, (byte)0x01, "weakCompareAndSetVolatile byte");
+ assertEquals(x, (byte)0x01, "weakCompareAndSet byte");
}
// Compare set and get
@@ -466,11 +466,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact((byte)0x01, (byte)0x23);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact((byte)0x01, (byte)0x23);
}
- assertEquals(success, true, "weakCompareAndSet byte");
+ assertEquals(success, true, "weakCompareAndSetPlain byte");
byte x = (byte) hs.get(TestAccessMode.GET).invokeExact();
- assertEquals(x, (byte)0x23, "weakCompareAndSet byte value");
+ assertEquals(x, (byte)0x23, "weakCompareAndSetPlain byte value");
}
{
@@ -496,11 +496,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact((byte)0x23, (byte)0x01);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact((byte)0x23, (byte)0x01);
}
- assertEquals(success, true, "weakCompareAndSetVolatile byte");
+ assertEquals(success, true, "weakCompareAndSet byte");
byte x = (byte) hs.get(TestAccessMode.GET).invokeExact();
- assertEquals(x, (byte)0x01, "weakCompareAndSetVolatile byte");
+ assertEquals(x, (byte)0x01, "weakCompareAndSet byte");
}
// Compare set and get
@@ -747,11 +747,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, (byte)0x01, (byte)0x23);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, (byte)0x01, (byte)0x23);
}
- assertEquals(success, true, "weakCompareAndSet byte");
+ assertEquals(success, true, "weakCompareAndSetPlain byte");
byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(array, i);
- assertEquals(x, (byte)0x23, "weakCompareAndSet byte value");
+ assertEquals(x, (byte)0x23, "weakCompareAndSetPlain byte value");
}
{
@@ -777,11 +777,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(array, i, (byte)0x23, (byte)0x01);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, (byte)0x23, (byte)0x01);
}
- assertEquals(success, true, "weakCompareAndSetVolatile byte");
+ assertEquals(success, true, "weakCompareAndSet byte");
byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(array, i);
- assertEquals(x, (byte)0x01, "weakCompareAndSetVolatile byte");
+ assertEquals(x, (byte)0x01, "weakCompareAndSet byte");
}
// Compare set and get
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessChar.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessChar.java Thu Sep 01 13:56:13 2016 -0700
@@ -210,11 +210,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, '\u0123', '\u4567');
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, '\u0123', '\u4567');
}
- assertEquals(success, true, "weakCompareAndSet char");
+ assertEquals(success, true, "weakCompareAndSetPlain char");
char x = (char) hs.get(TestAccessMode.GET).invokeExact(recv);
- assertEquals(x, '\u4567', "weakCompareAndSet char value");
+ assertEquals(x, '\u4567', "weakCompareAndSetPlain char value");
}
{
@@ -240,11 +240,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(recv, '\u4567', '\u0123');
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, '\u4567', '\u0123');
}
- assertEquals(success, true, "weakCompareAndSetVolatile char");
+ assertEquals(success, true, "weakCompareAndSet char");
char x = (char) hs.get(TestAccessMode.GET).invokeExact(recv);
- assertEquals(x, '\u0123', "weakCompareAndSetVolatile char");
+ assertEquals(x, '\u0123', "weakCompareAndSet char");
}
// Compare set and get
@@ -466,11 +466,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact('\u0123', '\u4567');
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact('\u0123', '\u4567');
}
- assertEquals(success, true, "weakCompareAndSet char");
+ assertEquals(success, true, "weakCompareAndSetPlain char");
char x = (char) hs.get(TestAccessMode.GET).invokeExact();
- assertEquals(x, '\u4567', "weakCompareAndSet char value");
+ assertEquals(x, '\u4567', "weakCompareAndSetPlain char value");
}
{
@@ -496,11 +496,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact('\u4567', '\u0123');
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact('\u4567', '\u0123');
}
- assertEquals(success, true, "weakCompareAndSetVolatile char");
+ assertEquals(success, true, "weakCompareAndSet char");
char x = (char) hs.get(TestAccessMode.GET).invokeExact();
- assertEquals(x, '\u0123', "weakCompareAndSetVolatile char");
+ assertEquals(x, '\u0123', "weakCompareAndSet char");
}
// Compare set and get
@@ -747,11 +747,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, '\u0123', '\u4567');
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, '\u0123', '\u4567');
}
- assertEquals(success, true, "weakCompareAndSet char");
+ assertEquals(success, true, "weakCompareAndSetPlain char");
char x = (char) hs.get(TestAccessMode.GET).invokeExact(array, i);
- assertEquals(x, '\u4567', "weakCompareAndSet char value");
+ assertEquals(x, '\u4567', "weakCompareAndSetPlain char value");
}
{
@@ -777,11 +777,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(array, i, '\u4567', '\u0123');
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, '\u4567', '\u0123');
}
- assertEquals(success, true, "weakCompareAndSetVolatile char");
+ assertEquals(success, true, "weakCompareAndSet char");
char x = (char) hs.get(TestAccessMode.GET).invokeExact(array, i);
- assertEquals(x, '\u0123', "weakCompareAndSetVolatile char");
+ assertEquals(x, '\u0123', "weakCompareAndSet char");
}
// Compare set and get
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessDouble.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessDouble.java Thu Sep 01 13:56:13 2016 -0700
@@ -210,11 +210,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, 1.0d, 2.0d);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, 1.0d, 2.0d);
}
- assertEquals(success, true, "weakCompareAndSet double");
+ assertEquals(success, true, "weakCompareAndSetPlain double");
double x = (double) hs.get(TestAccessMode.GET).invokeExact(recv);
- assertEquals(x, 2.0d, "weakCompareAndSet double value");
+ assertEquals(x, 2.0d, "weakCompareAndSetPlain double value");
}
{
@@ -240,11 +240,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(recv, 2.0d, 1.0d);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, 2.0d, 1.0d);
}
- assertEquals(success, true, "weakCompareAndSetVolatile double");
+ assertEquals(success, true, "weakCompareAndSet double");
double x = (double) hs.get(TestAccessMode.GET).invokeExact(recv);
- assertEquals(x, 1.0d, "weakCompareAndSetVolatile double");
+ assertEquals(x, 1.0d, "weakCompareAndSet double");
}
// Compare set and get
@@ -388,11 +388,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(1.0d, 2.0d);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(1.0d, 2.0d);
}
- assertEquals(success, true, "weakCompareAndSet double");
+ assertEquals(success, true, "weakCompareAndSetPlain double");
double x = (double) hs.get(TestAccessMode.GET).invokeExact();
- assertEquals(x, 2.0d, "weakCompareAndSet double value");
+ assertEquals(x, 2.0d, "weakCompareAndSetPlain double value");
}
{
@@ -418,11 +418,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(2.0d, 1.0d);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(2.0d, 1.0d);
}
- assertEquals(success, true, "weakCompareAndSetVolatile double");
+ assertEquals(success, true, "weakCompareAndSet double");
double x = (double) hs.get(TestAccessMode.GET).invokeExact();
- assertEquals(x, 1.0d, "weakCompareAndSetVolatile double");
+ assertEquals(x, 1.0d, "weakCompareAndSet double");
}
// Compare set and get
@@ -591,11 +591,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, 1.0d, 2.0d);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, 1.0d, 2.0d);
}
- assertEquals(success, true, "weakCompareAndSet double");
+ assertEquals(success, true, "weakCompareAndSetPlain double");
double x = (double) hs.get(TestAccessMode.GET).invokeExact(array, i);
- assertEquals(x, 2.0d, "weakCompareAndSet double value");
+ assertEquals(x, 2.0d, "weakCompareAndSetPlain double value");
}
{
@@ -621,11 +621,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(array, i, 2.0d, 1.0d);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, 2.0d, 1.0d);
}
- assertEquals(success, true, "weakCompareAndSetVolatile double");
+ assertEquals(success, true, "weakCompareAndSet double");
double x = (double) hs.get(TestAccessMode.GET).invokeExact(array, i);
- assertEquals(x, 1.0d, "weakCompareAndSetVolatile double");
+ assertEquals(x, 1.0d, "weakCompareAndSet double");
}
// Compare set and get
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessFloat.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessFloat.java Thu Sep 01 13:56:13 2016 -0700
@@ -210,11 +210,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, 1.0f, 2.0f);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, 1.0f, 2.0f);
}
- assertEquals(success, true, "weakCompareAndSet float");
+ assertEquals(success, true, "weakCompareAndSetPlain float");
float x = (float) hs.get(TestAccessMode.GET).invokeExact(recv);
- assertEquals(x, 2.0f, "weakCompareAndSet float value");
+ assertEquals(x, 2.0f, "weakCompareAndSetPlain float value");
}
{
@@ -240,11 +240,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(recv, 2.0f, 1.0f);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, 2.0f, 1.0f);
}
- assertEquals(success, true, "weakCompareAndSetVolatile float");
+ assertEquals(success, true, "weakCompareAndSet float");
float x = (float) hs.get(TestAccessMode.GET).invokeExact(recv);
- assertEquals(x, 1.0f, "weakCompareAndSetVolatile float");
+ assertEquals(x, 1.0f, "weakCompareAndSet float");
}
// Compare set and get
@@ -388,11 +388,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(1.0f, 2.0f);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(1.0f, 2.0f);
}
- assertEquals(success, true, "weakCompareAndSet float");
+ assertEquals(success, true, "weakCompareAndSetPlain float");
float x = (float) hs.get(TestAccessMode.GET).invokeExact();
- assertEquals(x, 2.0f, "weakCompareAndSet float value");
+ assertEquals(x, 2.0f, "weakCompareAndSetPlain float value");
}
{
@@ -418,11 +418,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(2.0f, 1.0f);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(2.0f, 1.0f);
}
- assertEquals(success, true, "weakCompareAndSetVolatile float");
+ assertEquals(success, true, "weakCompareAndSet float");
float x = (float) hs.get(TestAccessMode.GET).invokeExact();
- assertEquals(x, 1.0f, "weakCompareAndSetVolatile float");
+ assertEquals(x, 1.0f, "weakCompareAndSet float");
}
// Compare set and get
@@ -591,11 +591,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, 1.0f, 2.0f);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, 1.0f, 2.0f);
}
- assertEquals(success, true, "weakCompareAndSet float");
+ assertEquals(success, true, "weakCompareAndSetPlain float");
float x = (float) hs.get(TestAccessMode.GET).invokeExact(array, i);
- assertEquals(x, 2.0f, "weakCompareAndSet float value");
+ assertEquals(x, 2.0f, "weakCompareAndSetPlain float value");
}
{
@@ -621,11 +621,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(array, i, 2.0f, 1.0f);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, 2.0f, 1.0f);
}
- assertEquals(success, true, "weakCompareAndSetVolatile float");
+ assertEquals(success, true, "weakCompareAndSet float");
float x = (float) hs.get(TestAccessMode.GET).invokeExact(array, i);
- assertEquals(x, 1.0f, "weakCompareAndSetVolatile float");
+ assertEquals(x, 1.0f, "weakCompareAndSet float");
}
// Compare set and get
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessInt.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessInt.java Thu Sep 01 13:56:13 2016 -0700
@@ -210,11 +210,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, 0x01234567, 0x89ABCDEF);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, 0x01234567, 0x89ABCDEF);
}
- assertEquals(success, true, "weakCompareAndSet int");
+ assertEquals(success, true, "weakCompareAndSetPlain int");
int x = (int) hs.get(TestAccessMode.GET).invokeExact(recv);
- assertEquals(x, 0x89ABCDEF, "weakCompareAndSet int value");
+ assertEquals(x, 0x89ABCDEF, "weakCompareAndSetPlain int value");
}
{
@@ -240,11 +240,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(recv, 0x89ABCDEF, 0x01234567);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, 0x89ABCDEF, 0x01234567);
}
- assertEquals(success, true, "weakCompareAndSetVolatile int");
+ assertEquals(success, true, "weakCompareAndSet int");
int x = (int) hs.get(TestAccessMode.GET).invokeExact(recv);
- assertEquals(x, 0x01234567, "weakCompareAndSetVolatile int");
+ assertEquals(x, 0x01234567, "weakCompareAndSet int");
}
// Compare set and get
@@ -466,11 +466,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(0x01234567, 0x89ABCDEF);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(0x01234567, 0x89ABCDEF);
}
- assertEquals(success, true, "weakCompareAndSet int");
+ assertEquals(success, true, "weakCompareAndSetPlain int");
int x = (int) hs.get(TestAccessMode.GET).invokeExact();
- assertEquals(x, 0x89ABCDEF, "weakCompareAndSet int value");
+ assertEquals(x, 0x89ABCDEF, "weakCompareAndSetPlain int value");
}
{
@@ -496,11 +496,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(0x89ABCDEF, 0x01234567);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(0x89ABCDEF, 0x01234567);
}
- assertEquals(success, true, "weakCompareAndSetVolatile int");
+ assertEquals(success, true, "weakCompareAndSet int");
int x = (int) hs.get(TestAccessMode.GET).invokeExact();
- assertEquals(x, 0x01234567, "weakCompareAndSetVolatile int");
+ assertEquals(x, 0x01234567, "weakCompareAndSet int");
}
// Compare set and get
@@ -747,11 +747,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, 0x01234567, 0x89ABCDEF);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, 0x01234567, 0x89ABCDEF);
}
- assertEquals(success, true, "weakCompareAndSet int");
+ assertEquals(success, true, "weakCompareAndSetPlain int");
int x = (int) hs.get(TestAccessMode.GET).invokeExact(array, i);
- assertEquals(x, 0x89ABCDEF, "weakCompareAndSet int value");
+ assertEquals(x, 0x89ABCDEF, "weakCompareAndSetPlain int value");
}
{
@@ -777,11 +777,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(array, i, 0x89ABCDEF, 0x01234567);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, 0x89ABCDEF, 0x01234567);
}
- assertEquals(success, true, "weakCompareAndSetVolatile int");
+ assertEquals(success, true, "weakCompareAndSet int");
int x = (int) hs.get(TestAccessMode.GET).invokeExact(array, i);
- assertEquals(x, 0x01234567, "weakCompareAndSetVolatile int");
+ assertEquals(x, 0x01234567, "weakCompareAndSet int");
}
// Compare set and get
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessLong.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessLong.java Thu Sep 01 13:56:13 2016 -0700
@@ -210,11 +210,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
}
- assertEquals(success, true, "weakCompareAndSet long");
+ assertEquals(success, true, "weakCompareAndSetPlain long");
long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv);
- assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSet long value");
+ assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSetPlain long value");
}
{
@@ -240,11 +240,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(recv, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL);
}
- assertEquals(success, true, "weakCompareAndSetVolatile long");
+ assertEquals(success, true, "weakCompareAndSet long");
long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv);
- assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSetVolatile long");
+ assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSet long");
}
// Compare set and get
@@ -466,11 +466,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
}
- assertEquals(success, true, "weakCompareAndSet long");
+ assertEquals(success, true, "weakCompareAndSetPlain long");
long x = (long) hs.get(TestAccessMode.GET).invokeExact();
- assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSet long value");
+ assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSetPlain long value");
}
{
@@ -496,11 +496,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL);
}
- assertEquals(success, true, "weakCompareAndSetVolatile long");
+ assertEquals(success, true, "weakCompareAndSet long");
long x = (long) hs.get(TestAccessMode.GET).invokeExact();
- assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSetVolatile long");
+ assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSet long");
}
// Compare set and get
@@ -747,11 +747,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
}
- assertEquals(success, true, "weakCompareAndSet long");
+ assertEquals(success, true, "weakCompareAndSetPlain long");
long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i);
- assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSet long value");
+ assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSetPlain long value");
}
{
@@ -777,11 +777,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(array, i, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL);
}
- assertEquals(success, true, "weakCompareAndSetVolatile long");
+ assertEquals(success, true, "weakCompareAndSet long");
long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i);
- assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSetVolatile long");
+ assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSet long");
}
// Compare set and get
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessShort.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessShort.java Thu Sep 01 13:56:13 2016 -0700
@@ -210,11 +210,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, (short)0x0123, (short)0x4567);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, (short)0x0123, (short)0x4567);
}
- assertEquals(success, true, "weakCompareAndSet short");
+ assertEquals(success, true, "weakCompareAndSetPlain short");
short x = (short) hs.get(TestAccessMode.GET).invokeExact(recv);
- assertEquals(x, (short)0x4567, "weakCompareAndSet short value");
+ assertEquals(x, (short)0x4567, "weakCompareAndSetPlain short value");
}
{
@@ -240,11 +240,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(recv, (short)0x4567, (short)0x0123);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, (short)0x4567, (short)0x0123);
}
- assertEquals(success, true, "weakCompareAndSetVolatile short");
+ assertEquals(success, true, "weakCompareAndSet short");
short x = (short) hs.get(TestAccessMode.GET).invokeExact(recv);
- assertEquals(x, (short)0x0123, "weakCompareAndSetVolatile short");
+ assertEquals(x, (short)0x0123, "weakCompareAndSet short");
}
// Compare set and get
@@ -466,11 +466,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact((short)0x0123, (short)0x4567);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact((short)0x0123, (short)0x4567);
}
- assertEquals(success, true, "weakCompareAndSet short");
+ assertEquals(success, true, "weakCompareAndSetPlain short");
short x = (short) hs.get(TestAccessMode.GET).invokeExact();
- assertEquals(x, (short)0x4567, "weakCompareAndSet short value");
+ assertEquals(x, (short)0x4567, "weakCompareAndSetPlain short value");
}
{
@@ -496,11 +496,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact((short)0x4567, (short)0x0123);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact((short)0x4567, (short)0x0123);
}
- assertEquals(success, true, "weakCompareAndSetVolatile short");
+ assertEquals(success, true, "weakCompareAndSet short");
short x = (short) hs.get(TestAccessMode.GET).invokeExact();
- assertEquals(x, (short)0x0123, "weakCompareAndSetVolatile short");
+ assertEquals(x, (short)0x0123, "weakCompareAndSet short");
}
// Compare set and get
@@ -747,11 +747,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, (short)0x0123, (short)0x4567);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, (short)0x0123, (short)0x4567);
}
- assertEquals(success, true, "weakCompareAndSet short");
+ assertEquals(success, true, "weakCompareAndSetPlain short");
short x = (short) hs.get(TestAccessMode.GET).invokeExact(array, i);
- assertEquals(x, (short)0x4567, "weakCompareAndSet short value");
+ assertEquals(x, (short)0x4567, "weakCompareAndSetPlain short value");
}
{
@@ -777,11 +777,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(array, i, (short)0x4567, (short)0x0123);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, (short)0x4567, (short)0x0123);
}
- assertEquals(success, true, "weakCompareAndSetVolatile short");
+ assertEquals(success, true, "weakCompareAndSet short");
short x = (short) hs.get(TestAccessMode.GET).invokeExact(array, i);
- assertEquals(x, (short)0x0123, "weakCompareAndSetVolatile short");
+ assertEquals(x, (short)0x0123, "weakCompareAndSet short");
}
// Compare set and get
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessString.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessString.java Thu Sep 01 13:56:13 2016 -0700
@@ -210,11 +210,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, "foo", "bar");
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, "foo", "bar");
}
- assertEquals(success, true, "weakCompareAndSet String");
+ assertEquals(success, true, "weakCompareAndSetPlain String");
String x = (String) hs.get(TestAccessMode.GET).invokeExact(recv);
- assertEquals(x, "bar", "weakCompareAndSet String value");
+ assertEquals(x, "bar", "weakCompareAndSetPlain String value");
}
{
@@ -240,11 +240,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(recv, "bar", "foo");
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, "bar", "foo");
}
- assertEquals(success, true, "weakCompareAndSetVolatile String");
+ assertEquals(success, true, "weakCompareAndSet String");
String x = (String) hs.get(TestAccessMode.GET).invokeExact(recv);
- assertEquals(x, "foo", "weakCompareAndSetVolatile String");
+ assertEquals(x, "foo", "weakCompareAndSet String");
}
// Compare set and get
@@ -366,11 +366,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact("foo", "bar");
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact("foo", "bar");
}
- assertEquals(success, true, "weakCompareAndSet String");
+ assertEquals(success, true, "weakCompareAndSetPlain String");
String x = (String) hs.get(TestAccessMode.GET).invokeExact();
- assertEquals(x, "bar", "weakCompareAndSet String value");
+ assertEquals(x, "bar", "weakCompareAndSetPlain String value");
}
{
@@ -396,11 +396,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact("bar", "foo");
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact("bar", "foo");
}
- assertEquals(success, true, "weakCompareAndSetVolatile String");
+ assertEquals(success, true, "weakCompareAndSet String");
String x = (String) hs.get(TestAccessMode.GET).invokeExact();
- assertEquals(x, "foo", "weakCompareAndSetVolatile String");
+ assertEquals(x, "foo", "weakCompareAndSet String");
}
// Compare set and get
@@ -547,11 +547,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, "foo", "bar");
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, "foo", "bar");
}
- assertEquals(success, true, "weakCompareAndSet String");
+ assertEquals(success, true, "weakCompareAndSetPlain String");
String x = (String) hs.get(TestAccessMode.GET).invokeExact(array, i);
- assertEquals(x, "bar", "weakCompareAndSet String value");
+ assertEquals(x, "bar", "weakCompareAndSetPlain String value");
}
{
@@ -577,11 +577,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(array, i, "bar", "foo");
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, "bar", "foo");
}
- assertEquals(success, true, "weakCompareAndSetVolatile String");
+ assertEquals(success, true, "weakCompareAndSet String");
String x = (String) hs.get(TestAccessMode.GET).invokeExact(array, i);
- assertEquals(x, "foo", "weakCompareAndSetVolatile String");
+ assertEquals(x, "foo", "weakCompareAndSet String");
}
// Compare set and get
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeBoolean.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeBoolean.java Thu Sep 01 13:56:13 2016 -0700
@@ -353,6 +353,32 @@
// WeakCompareAndSet
// Incorrect argument types
checkNPE(() -> { // null receiver
+ boolean r = vh.weakCompareAndSetPlain(null, true, true);
+ });
+ checkCCE(() -> { // receiver reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, true, true);
+ });
+ checkWMTE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(recv, Void.class, true);
+ });
+ checkWMTE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(recv, true, Void.class);
+ });
+ checkWMTE(() -> { // receiver primitive class
+ boolean r = vh.weakCompareAndSetPlain(0, true, true);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(recv, true, true, Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkNPE(() -> { // null receiver
boolean r = vh.weakCompareAndSet(null, true, true);
});
checkCCE(() -> { // receiver reference class
@@ -376,32 +402,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkNPE(() -> { // null receiver
- boolean r = vh.weakCompareAndSetVolatile(null, true, true);
- });
- checkCCE(() -> { // receiver reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, true, true);
- });
- checkWMTE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(recv, Void.class, true);
- });
- checkWMTE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(recv, true, Void.class);
- });
- checkWMTE(() -> { // receiver primitive class
- boolean r = vh.weakCompareAndSetVolatile(0, true, true);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(recv, true, true, Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkNPE(() -> { // null receiver
@@ -1256,6 +1256,23 @@
// WeakCompareAndSet
// Incorrect argument types
checkWMTE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, true);
+ });
+ checkWMTE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(true, Void.class);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(true, true, Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkWMTE(() -> { // expected reference class
boolean r = vh.weakCompareAndSet(Void.class, true);
});
checkWMTE(() -> { // actual reference class
@@ -1270,23 +1287,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkWMTE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, true);
- });
- checkWMTE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(true, Void.class);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(true, true, Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkWMTE(() -> { // expected reference class
@@ -2046,6 +2046,35 @@
// WeakCompareAndSet
// Incorrect argument types
checkNPE(() -> { // null receiver
+ boolean r = vh.weakCompareAndSetPlain(null, 0, true, true);
+ });
+ checkCCE(() -> { // receiver reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, 0, true, true);
+ });
+ checkWMTE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(array, 0, Void.class, true);
+ });
+ checkWMTE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(array, 0, true, Void.class);
+ });
+ checkWMTE(() -> { // receiver primitive class
+ boolean r = vh.weakCompareAndSetPlain(0, 0, true, true);
+ });
+ checkWMTE(() -> { // index reference class
+ boolean r = vh.weakCompareAndSetPlain(array, Void.class, true, true);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(array, 0, true, true, Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkNPE(() -> { // null receiver
boolean r = vh.weakCompareAndSet(null, 0, true, true);
});
checkCCE(() -> { // receiver reference class
@@ -2072,35 +2101,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkNPE(() -> { // null receiver
- boolean r = vh.weakCompareAndSetVolatile(null, 0, true, true);
- });
- checkCCE(() -> { // receiver reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, 0, true, true);
- });
- checkWMTE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(array, 0, Void.class, true);
- });
- checkWMTE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(array, 0, true, Void.class);
- });
- checkWMTE(() -> { // receiver primitive class
- boolean r = vh.weakCompareAndSetVolatile(0, 0, true, true);
- });
- checkWMTE(() -> { // index reference class
- boolean r = vh.weakCompareAndSetVolatile(array, Void.class, true, true);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(array, 0, true, true, Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkNPE(() -> { // null receiver
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeByte.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeByte.java Thu Sep 01 13:56:13 2016 -0700
@@ -353,6 +353,32 @@
// WeakCompareAndSet
// Incorrect argument types
checkNPE(() -> { // null receiver
+ boolean r = vh.weakCompareAndSetPlain(null, (byte)0x01, (byte)0x01);
+ });
+ checkCCE(() -> { // receiver reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, (byte)0x01, (byte)0x01);
+ });
+ checkWMTE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(recv, Void.class, (byte)0x01);
+ });
+ checkWMTE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(recv, (byte)0x01, Void.class);
+ });
+ checkWMTE(() -> { // receiver primitive class
+ boolean r = vh.weakCompareAndSetPlain(0, (byte)0x01, (byte)0x01);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(recv, (byte)0x01, (byte)0x01, Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkNPE(() -> { // null receiver
boolean r = vh.weakCompareAndSet(null, (byte)0x01, (byte)0x01);
});
checkCCE(() -> { // receiver reference class
@@ -376,32 +402,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkNPE(() -> { // null receiver
- boolean r = vh.weakCompareAndSetVolatile(null, (byte)0x01, (byte)0x01);
- });
- checkCCE(() -> { // receiver reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, (byte)0x01, (byte)0x01);
- });
- checkWMTE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(recv, Void.class, (byte)0x01);
- });
- checkWMTE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(recv, (byte)0x01, Void.class);
- });
- checkWMTE(() -> { // receiver primitive class
- boolean r = vh.weakCompareAndSetVolatile(0, (byte)0x01, (byte)0x01);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(recv, (byte)0x01, (byte)0x01, Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkNPE(() -> { // null receiver
@@ -1378,6 +1378,23 @@
// WeakCompareAndSet
// Incorrect argument types
checkWMTE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, (byte)0x01);
+ });
+ checkWMTE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain((byte)0x01, Void.class);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain((byte)0x01, (byte)0x01, Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkWMTE(() -> { // expected reference class
boolean r = vh.weakCompareAndSet(Void.class, (byte)0x01);
});
checkWMTE(() -> { // actual reference class
@@ -1392,23 +1409,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkWMTE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, (byte)0x01);
- });
- checkWMTE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile((byte)0x01, Void.class);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile((byte)0x01, (byte)0x01, Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkWMTE(() -> { // expected reference class
@@ -2254,6 +2254,35 @@
// WeakCompareAndSet
// Incorrect argument types
checkNPE(() -> { // null receiver
+ boolean r = vh.weakCompareAndSetPlain(null, 0, (byte)0x01, (byte)0x01);
+ });
+ checkCCE(() -> { // receiver reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, 0, (byte)0x01, (byte)0x01);
+ });
+ checkWMTE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(array, 0, Void.class, (byte)0x01);
+ });
+ checkWMTE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(array, 0, (byte)0x01, Void.class);
+ });
+ checkWMTE(() -> { // receiver primitive class
+ boolean r = vh.weakCompareAndSetPlain(0, 0, (byte)0x01, (byte)0x01);
+ });
+ checkWMTE(() -> { // index reference class
+ boolean r = vh.weakCompareAndSetPlain(array, Void.class, (byte)0x01, (byte)0x01);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(array, 0, (byte)0x01, (byte)0x01, Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkNPE(() -> { // null receiver
boolean r = vh.weakCompareAndSet(null, 0, (byte)0x01, (byte)0x01);
});
checkCCE(() -> { // receiver reference class
@@ -2280,35 +2309,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkNPE(() -> { // null receiver
- boolean r = vh.weakCompareAndSetVolatile(null, 0, (byte)0x01, (byte)0x01);
- });
- checkCCE(() -> { // receiver reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, 0, (byte)0x01, (byte)0x01);
- });
- checkWMTE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(array, 0, Void.class, (byte)0x01);
- });
- checkWMTE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(array, 0, (byte)0x01, Void.class);
- });
- checkWMTE(() -> { // receiver primitive class
- boolean r = vh.weakCompareAndSetVolatile(0, 0, (byte)0x01, (byte)0x01);
- });
- checkWMTE(() -> { // index reference class
- boolean r = vh.weakCompareAndSetVolatile(array, Void.class, (byte)0x01, (byte)0x01);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(array, 0, (byte)0x01, (byte)0x01, Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkNPE(() -> { // null receiver
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeChar.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeChar.java Thu Sep 01 13:56:13 2016 -0700
@@ -353,6 +353,32 @@
// WeakCompareAndSet
// Incorrect argument types
checkNPE(() -> { // null receiver
+ boolean r = vh.weakCompareAndSetPlain(null, '\u0123', '\u0123');
+ });
+ checkCCE(() -> { // receiver reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, '\u0123', '\u0123');
+ });
+ checkWMTE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(recv, Void.class, '\u0123');
+ });
+ checkWMTE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(recv, '\u0123', Void.class);
+ });
+ checkWMTE(() -> { // receiver primitive class
+ boolean r = vh.weakCompareAndSetPlain(0, '\u0123', '\u0123');
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(recv, '\u0123', '\u0123', Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkNPE(() -> { // null receiver
boolean r = vh.weakCompareAndSet(null, '\u0123', '\u0123');
});
checkCCE(() -> { // receiver reference class
@@ -376,32 +402,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkNPE(() -> { // null receiver
- boolean r = vh.weakCompareAndSetVolatile(null, '\u0123', '\u0123');
- });
- checkCCE(() -> { // receiver reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, '\u0123', '\u0123');
- });
- checkWMTE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(recv, Void.class, '\u0123');
- });
- checkWMTE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(recv, '\u0123', Void.class);
- });
- checkWMTE(() -> { // receiver primitive class
- boolean r = vh.weakCompareAndSetVolatile(0, '\u0123', '\u0123');
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(recv, '\u0123', '\u0123', Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkNPE(() -> { // null receiver
@@ -1378,6 +1378,23 @@
// WeakCompareAndSet
// Incorrect argument types
checkWMTE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, '\u0123');
+ });
+ checkWMTE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain('\u0123', Void.class);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain('\u0123', '\u0123', Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkWMTE(() -> { // expected reference class
boolean r = vh.weakCompareAndSet(Void.class, '\u0123');
});
checkWMTE(() -> { // actual reference class
@@ -1392,23 +1409,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkWMTE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, '\u0123');
- });
- checkWMTE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile('\u0123', Void.class);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile('\u0123', '\u0123', Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkWMTE(() -> { // expected reference class
@@ -2254,6 +2254,35 @@
// WeakCompareAndSet
// Incorrect argument types
checkNPE(() -> { // null receiver
+ boolean r = vh.weakCompareAndSetPlain(null, 0, '\u0123', '\u0123');
+ });
+ checkCCE(() -> { // receiver reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, 0, '\u0123', '\u0123');
+ });
+ checkWMTE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(array, 0, Void.class, '\u0123');
+ });
+ checkWMTE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(array, 0, '\u0123', Void.class);
+ });
+ checkWMTE(() -> { // receiver primitive class
+ boolean r = vh.weakCompareAndSetPlain(0, 0, '\u0123', '\u0123');
+ });
+ checkWMTE(() -> { // index reference class
+ boolean r = vh.weakCompareAndSetPlain(array, Void.class, '\u0123', '\u0123');
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(array, 0, '\u0123', '\u0123', Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkNPE(() -> { // null receiver
boolean r = vh.weakCompareAndSet(null, 0, '\u0123', '\u0123');
});
checkCCE(() -> { // receiver reference class
@@ -2280,35 +2309,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkNPE(() -> { // null receiver
- boolean r = vh.weakCompareAndSetVolatile(null, 0, '\u0123', '\u0123');
- });
- checkCCE(() -> { // receiver reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, 0, '\u0123', '\u0123');
- });
- checkWMTE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(array, 0, Void.class, '\u0123');
- });
- checkWMTE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(array, 0, '\u0123', Void.class);
- });
- checkWMTE(() -> { // receiver primitive class
- boolean r = vh.weakCompareAndSetVolatile(0, 0, '\u0123', '\u0123');
- });
- checkWMTE(() -> { // index reference class
- boolean r = vh.weakCompareAndSetVolatile(array, Void.class, '\u0123', '\u0123');
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(array, 0, '\u0123', '\u0123', Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkNPE(() -> { // null receiver
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeDouble.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeDouble.java Thu Sep 01 13:56:13 2016 -0700
@@ -353,6 +353,32 @@
// WeakCompareAndSet
// Incorrect argument types
checkNPE(() -> { // null receiver
+ boolean r = vh.weakCompareAndSetPlain(null, 1.0d, 1.0d);
+ });
+ checkCCE(() -> { // receiver reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, 1.0d, 1.0d);
+ });
+ checkWMTE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(recv, Void.class, 1.0d);
+ });
+ checkWMTE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(recv, 1.0d, Void.class);
+ });
+ checkWMTE(() -> { // receiver primitive class
+ boolean r = vh.weakCompareAndSetPlain(0, 1.0d, 1.0d);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(recv, 1.0d, 1.0d, Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkNPE(() -> { // null receiver
boolean r = vh.weakCompareAndSet(null, 1.0d, 1.0d);
});
checkCCE(() -> { // receiver reference class
@@ -376,32 +402,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkNPE(() -> { // null receiver
- boolean r = vh.weakCompareAndSetVolatile(null, 1.0d, 1.0d);
- });
- checkCCE(() -> { // receiver reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, 1.0d, 1.0d);
- });
- checkWMTE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(recv, Void.class, 1.0d);
- });
- checkWMTE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(recv, 1.0d, Void.class);
- });
- checkWMTE(() -> { // receiver primitive class
- boolean r = vh.weakCompareAndSetVolatile(0, 1.0d, 1.0d);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(recv, 1.0d, 1.0d, Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkNPE(() -> { // null receiver
@@ -1074,6 +1074,23 @@
// WeakCompareAndSet
// Incorrect argument types
checkWMTE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, 1.0d);
+ });
+ checkWMTE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(1.0d, Void.class);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(1.0d, 1.0d, Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkWMTE(() -> { // expected reference class
boolean r = vh.weakCompareAndSet(Void.class, 1.0d);
});
checkWMTE(() -> { // actual reference class
@@ -1088,23 +1105,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkWMTE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, 1.0d);
- });
- checkWMTE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(1.0d, Void.class);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(1.0d, 1.0d, Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkWMTE(() -> { // expected reference class
@@ -1738,6 +1738,35 @@
// WeakCompareAndSet
// Incorrect argument types
checkNPE(() -> { // null receiver
+ boolean r = vh.weakCompareAndSetPlain(null, 0, 1.0d, 1.0d);
+ });
+ checkCCE(() -> { // receiver reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, 0, 1.0d, 1.0d);
+ });
+ checkWMTE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(array, 0, Void.class, 1.0d);
+ });
+ checkWMTE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(array, 0, 1.0d, Void.class);
+ });
+ checkWMTE(() -> { // receiver primitive class
+ boolean r = vh.weakCompareAndSetPlain(0, 0, 1.0d, 1.0d);
+ });
+ checkWMTE(() -> { // index reference class
+ boolean r = vh.weakCompareAndSetPlain(array, Void.class, 1.0d, 1.0d);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(array, 0, 1.0d, 1.0d, Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkNPE(() -> { // null receiver
boolean r = vh.weakCompareAndSet(null, 0, 1.0d, 1.0d);
});
checkCCE(() -> { // receiver reference class
@@ -1764,35 +1793,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkNPE(() -> { // null receiver
- boolean r = vh.weakCompareAndSetVolatile(null, 0, 1.0d, 1.0d);
- });
- checkCCE(() -> { // receiver reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, 0, 1.0d, 1.0d);
- });
- checkWMTE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(array, 0, Void.class, 1.0d);
- });
- checkWMTE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(array, 0, 1.0d, Void.class);
- });
- checkWMTE(() -> { // receiver primitive class
- boolean r = vh.weakCompareAndSetVolatile(0, 0, 1.0d, 1.0d);
- });
- checkWMTE(() -> { // index reference class
- boolean r = vh.weakCompareAndSetVolatile(array, Void.class, 1.0d, 1.0d);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(array, 0, 1.0d, 1.0d, Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkNPE(() -> { // null receiver
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeFloat.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeFloat.java Thu Sep 01 13:56:13 2016 -0700
@@ -353,6 +353,32 @@
// WeakCompareAndSet
// Incorrect argument types
checkNPE(() -> { // null receiver
+ boolean r = vh.weakCompareAndSetPlain(null, 1.0f, 1.0f);
+ });
+ checkCCE(() -> { // receiver reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, 1.0f, 1.0f);
+ });
+ checkWMTE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(recv, Void.class, 1.0f);
+ });
+ checkWMTE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(recv, 1.0f, Void.class);
+ });
+ checkWMTE(() -> { // receiver primitive class
+ boolean r = vh.weakCompareAndSetPlain(0, 1.0f, 1.0f);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(recv, 1.0f, 1.0f, Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkNPE(() -> { // null receiver
boolean r = vh.weakCompareAndSet(null, 1.0f, 1.0f);
});
checkCCE(() -> { // receiver reference class
@@ -376,32 +402,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkNPE(() -> { // null receiver
- boolean r = vh.weakCompareAndSetVolatile(null, 1.0f, 1.0f);
- });
- checkCCE(() -> { // receiver reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, 1.0f, 1.0f);
- });
- checkWMTE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(recv, Void.class, 1.0f);
- });
- checkWMTE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(recv, 1.0f, Void.class);
- });
- checkWMTE(() -> { // receiver primitive class
- boolean r = vh.weakCompareAndSetVolatile(0, 1.0f, 1.0f);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(recv, 1.0f, 1.0f, Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkNPE(() -> { // null receiver
@@ -1074,6 +1074,23 @@
// WeakCompareAndSet
// Incorrect argument types
checkWMTE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, 1.0f);
+ });
+ checkWMTE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(1.0f, Void.class);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(1.0f, 1.0f, Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkWMTE(() -> { // expected reference class
boolean r = vh.weakCompareAndSet(Void.class, 1.0f);
});
checkWMTE(() -> { // actual reference class
@@ -1088,23 +1105,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkWMTE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, 1.0f);
- });
- checkWMTE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(1.0f, Void.class);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(1.0f, 1.0f, Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkWMTE(() -> { // expected reference class
@@ -1738,6 +1738,35 @@
// WeakCompareAndSet
// Incorrect argument types
checkNPE(() -> { // null receiver
+ boolean r = vh.weakCompareAndSetPlain(null, 0, 1.0f, 1.0f);
+ });
+ checkCCE(() -> { // receiver reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, 0, 1.0f, 1.0f);
+ });
+ checkWMTE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(array, 0, Void.class, 1.0f);
+ });
+ checkWMTE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(array, 0, 1.0f, Void.class);
+ });
+ checkWMTE(() -> { // receiver primitive class
+ boolean r = vh.weakCompareAndSetPlain(0, 0, 1.0f, 1.0f);
+ });
+ checkWMTE(() -> { // index reference class
+ boolean r = vh.weakCompareAndSetPlain(array, Void.class, 1.0f, 1.0f);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(array, 0, 1.0f, 1.0f, Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkNPE(() -> { // null receiver
boolean r = vh.weakCompareAndSet(null, 0, 1.0f, 1.0f);
});
checkCCE(() -> { // receiver reference class
@@ -1764,35 +1793,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkNPE(() -> { // null receiver
- boolean r = vh.weakCompareAndSetVolatile(null, 0, 1.0f, 1.0f);
- });
- checkCCE(() -> { // receiver reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, 0, 1.0f, 1.0f);
- });
- checkWMTE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(array, 0, Void.class, 1.0f);
- });
- checkWMTE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(array, 0, 1.0f, Void.class);
- });
- checkWMTE(() -> { // receiver primitive class
- boolean r = vh.weakCompareAndSetVolatile(0, 0, 1.0f, 1.0f);
- });
- checkWMTE(() -> { // index reference class
- boolean r = vh.weakCompareAndSetVolatile(array, Void.class, 1.0f, 1.0f);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(array, 0, 1.0f, 1.0f, Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkNPE(() -> { // null receiver
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeInt.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeInt.java Thu Sep 01 13:56:13 2016 -0700
@@ -353,6 +353,32 @@
// WeakCompareAndSet
// Incorrect argument types
checkNPE(() -> { // null receiver
+ boolean r = vh.weakCompareAndSetPlain(null, 0x01234567, 0x01234567);
+ });
+ checkCCE(() -> { // receiver reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, 0x01234567, 0x01234567);
+ });
+ checkWMTE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(recv, Void.class, 0x01234567);
+ });
+ checkWMTE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(recv, 0x01234567, Void.class);
+ });
+ checkWMTE(() -> { // receiver primitive class
+ boolean r = vh.weakCompareAndSetPlain(0, 0x01234567, 0x01234567);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(recv, 0x01234567, 0x01234567, Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkNPE(() -> { // null receiver
boolean r = vh.weakCompareAndSet(null, 0x01234567, 0x01234567);
});
checkCCE(() -> { // receiver reference class
@@ -376,32 +402,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkNPE(() -> { // null receiver
- boolean r = vh.weakCompareAndSetVolatile(null, 0x01234567, 0x01234567);
- });
- checkCCE(() -> { // receiver reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, 0x01234567, 0x01234567);
- });
- checkWMTE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(recv, Void.class, 0x01234567);
- });
- checkWMTE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(recv, 0x01234567, Void.class);
- });
- checkWMTE(() -> { // receiver primitive class
- boolean r = vh.weakCompareAndSetVolatile(0, 0x01234567, 0x01234567);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(recv, 0x01234567, 0x01234567, Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkNPE(() -> { // null receiver
@@ -1378,6 +1378,23 @@
// WeakCompareAndSet
// Incorrect argument types
checkWMTE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, 0x01234567);
+ });
+ checkWMTE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(0x01234567, Void.class);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(0x01234567, 0x01234567, Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkWMTE(() -> { // expected reference class
boolean r = vh.weakCompareAndSet(Void.class, 0x01234567);
});
checkWMTE(() -> { // actual reference class
@@ -1392,23 +1409,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkWMTE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, 0x01234567);
- });
- checkWMTE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(0x01234567, Void.class);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(0x01234567, 0x01234567, Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkWMTE(() -> { // expected reference class
@@ -2254,6 +2254,35 @@
// WeakCompareAndSet
// Incorrect argument types
checkNPE(() -> { // null receiver
+ boolean r = vh.weakCompareAndSetPlain(null, 0, 0x01234567, 0x01234567);
+ });
+ checkCCE(() -> { // receiver reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, 0, 0x01234567, 0x01234567);
+ });
+ checkWMTE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(array, 0, Void.class, 0x01234567);
+ });
+ checkWMTE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(array, 0, 0x01234567, Void.class);
+ });
+ checkWMTE(() -> { // receiver primitive class
+ boolean r = vh.weakCompareAndSetPlain(0, 0, 0x01234567, 0x01234567);
+ });
+ checkWMTE(() -> { // index reference class
+ boolean r = vh.weakCompareAndSetPlain(array, Void.class, 0x01234567, 0x01234567);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(array, 0, 0x01234567, 0x01234567, Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkNPE(() -> { // null receiver
boolean r = vh.weakCompareAndSet(null, 0, 0x01234567, 0x01234567);
});
checkCCE(() -> { // receiver reference class
@@ -2280,35 +2309,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkNPE(() -> { // null receiver
- boolean r = vh.weakCompareAndSetVolatile(null, 0, 0x01234567, 0x01234567);
- });
- checkCCE(() -> { // receiver reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, 0, 0x01234567, 0x01234567);
- });
- checkWMTE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(array, 0, Void.class, 0x01234567);
- });
- checkWMTE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(array, 0, 0x01234567, Void.class);
- });
- checkWMTE(() -> { // receiver primitive class
- boolean r = vh.weakCompareAndSetVolatile(0, 0, 0x01234567, 0x01234567);
- });
- checkWMTE(() -> { // index reference class
- boolean r = vh.weakCompareAndSetVolatile(array, Void.class, 0x01234567, 0x01234567);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(array, 0, 0x01234567, 0x01234567, Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkNPE(() -> { // null receiver
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeLong.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeLong.java Thu Sep 01 13:56:13 2016 -0700
@@ -353,6 +353,32 @@
// WeakCompareAndSet
// Incorrect argument types
checkNPE(() -> { // null receiver
+ boolean r = vh.weakCompareAndSetPlain(null, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
+ });
+ checkCCE(() -> { // receiver reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
+ });
+ checkWMTE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(recv, Void.class, 0x0123456789ABCDEFL);
+ });
+ checkWMTE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(recv, 0x0123456789ABCDEFL, Void.class);
+ });
+ checkWMTE(() -> { // receiver primitive class
+ boolean r = vh.weakCompareAndSetPlain(0, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(recv, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL, Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkNPE(() -> { // null receiver
boolean r = vh.weakCompareAndSet(null, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
});
checkCCE(() -> { // receiver reference class
@@ -376,32 +402,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkNPE(() -> { // null receiver
- boolean r = vh.weakCompareAndSetVolatile(null, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
- });
- checkCCE(() -> { // receiver reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
- });
- checkWMTE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(recv, Void.class, 0x0123456789ABCDEFL);
- });
- checkWMTE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(recv, 0x0123456789ABCDEFL, Void.class);
- });
- checkWMTE(() -> { // receiver primitive class
- boolean r = vh.weakCompareAndSetVolatile(0, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(recv, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL, Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkNPE(() -> { // null receiver
@@ -1378,6 +1378,23 @@
// WeakCompareAndSet
// Incorrect argument types
checkWMTE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, 0x0123456789ABCDEFL);
+ });
+ checkWMTE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(0x0123456789ABCDEFL, Void.class);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(0x0123456789ABCDEFL, 0x0123456789ABCDEFL, Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkWMTE(() -> { // expected reference class
boolean r = vh.weakCompareAndSet(Void.class, 0x0123456789ABCDEFL);
});
checkWMTE(() -> { // actual reference class
@@ -1392,23 +1409,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkWMTE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, 0x0123456789ABCDEFL);
- });
- checkWMTE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(0x0123456789ABCDEFL, Void.class);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(0x0123456789ABCDEFL, 0x0123456789ABCDEFL, Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkWMTE(() -> { // expected reference class
@@ -2254,6 +2254,35 @@
// WeakCompareAndSet
// Incorrect argument types
checkNPE(() -> { // null receiver
+ boolean r = vh.weakCompareAndSetPlain(null, 0, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
+ });
+ checkCCE(() -> { // receiver reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, 0, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
+ });
+ checkWMTE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(array, 0, Void.class, 0x0123456789ABCDEFL);
+ });
+ checkWMTE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(array, 0, 0x0123456789ABCDEFL, Void.class);
+ });
+ checkWMTE(() -> { // receiver primitive class
+ boolean r = vh.weakCompareAndSetPlain(0, 0, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
+ });
+ checkWMTE(() -> { // index reference class
+ boolean r = vh.weakCompareAndSetPlain(array, Void.class, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(array, 0, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL, Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkNPE(() -> { // null receiver
boolean r = vh.weakCompareAndSet(null, 0, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
});
checkCCE(() -> { // receiver reference class
@@ -2280,35 +2309,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkNPE(() -> { // null receiver
- boolean r = vh.weakCompareAndSetVolatile(null, 0, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
- });
- checkCCE(() -> { // receiver reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, 0, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
- });
- checkWMTE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(array, 0, Void.class, 0x0123456789ABCDEFL);
- });
- checkWMTE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(array, 0, 0x0123456789ABCDEFL, Void.class);
- });
- checkWMTE(() -> { // receiver primitive class
- boolean r = vh.weakCompareAndSetVolatile(0, 0, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
- });
- checkWMTE(() -> { // index reference class
- boolean r = vh.weakCompareAndSetVolatile(array, Void.class, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(array, 0, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL, Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkNPE(() -> { // null receiver
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeShort.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeShort.java Thu Sep 01 13:56:13 2016 -0700
@@ -353,6 +353,32 @@
// WeakCompareAndSet
// Incorrect argument types
checkNPE(() -> { // null receiver
+ boolean r = vh.weakCompareAndSetPlain(null, (short)0x0123, (short)0x0123);
+ });
+ checkCCE(() -> { // receiver reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, (short)0x0123, (short)0x0123);
+ });
+ checkWMTE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(recv, Void.class, (short)0x0123);
+ });
+ checkWMTE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(recv, (short)0x0123, Void.class);
+ });
+ checkWMTE(() -> { // receiver primitive class
+ boolean r = vh.weakCompareAndSetPlain(0, (short)0x0123, (short)0x0123);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(recv, (short)0x0123, (short)0x0123, Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkNPE(() -> { // null receiver
boolean r = vh.weakCompareAndSet(null, (short)0x0123, (short)0x0123);
});
checkCCE(() -> { // receiver reference class
@@ -376,32 +402,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkNPE(() -> { // null receiver
- boolean r = vh.weakCompareAndSetVolatile(null, (short)0x0123, (short)0x0123);
- });
- checkCCE(() -> { // receiver reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, (short)0x0123, (short)0x0123);
- });
- checkWMTE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(recv, Void.class, (short)0x0123);
- });
- checkWMTE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(recv, (short)0x0123, Void.class);
- });
- checkWMTE(() -> { // receiver primitive class
- boolean r = vh.weakCompareAndSetVolatile(0, (short)0x0123, (short)0x0123);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(recv, (short)0x0123, (short)0x0123, Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkNPE(() -> { // null receiver
@@ -1378,6 +1378,23 @@
// WeakCompareAndSet
// Incorrect argument types
checkWMTE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, (short)0x0123);
+ });
+ checkWMTE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain((short)0x0123, Void.class);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain((short)0x0123, (short)0x0123, Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkWMTE(() -> { // expected reference class
boolean r = vh.weakCompareAndSet(Void.class, (short)0x0123);
});
checkWMTE(() -> { // actual reference class
@@ -1392,23 +1409,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkWMTE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, (short)0x0123);
- });
- checkWMTE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile((short)0x0123, Void.class);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile((short)0x0123, (short)0x0123, Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkWMTE(() -> { // expected reference class
@@ -2254,6 +2254,35 @@
// WeakCompareAndSet
// Incorrect argument types
checkNPE(() -> { // null receiver
+ boolean r = vh.weakCompareAndSetPlain(null, 0, (short)0x0123, (short)0x0123);
+ });
+ checkCCE(() -> { // receiver reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, 0, (short)0x0123, (short)0x0123);
+ });
+ checkWMTE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(array, 0, Void.class, (short)0x0123);
+ });
+ checkWMTE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(array, 0, (short)0x0123, Void.class);
+ });
+ checkWMTE(() -> { // receiver primitive class
+ boolean r = vh.weakCompareAndSetPlain(0, 0, (short)0x0123, (short)0x0123);
+ });
+ checkWMTE(() -> { // index reference class
+ boolean r = vh.weakCompareAndSetPlain(array, Void.class, (short)0x0123, (short)0x0123);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(array, 0, (short)0x0123, (short)0x0123, Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkNPE(() -> { // null receiver
boolean r = vh.weakCompareAndSet(null, 0, (short)0x0123, (short)0x0123);
});
checkCCE(() -> { // receiver reference class
@@ -2280,35 +2309,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkNPE(() -> { // null receiver
- boolean r = vh.weakCompareAndSetVolatile(null, 0, (short)0x0123, (short)0x0123);
- });
- checkCCE(() -> { // receiver reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, 0, (short)0x0123, (short)0x0123);
- });
- checkWMTE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(array, 0, Void.class, (short)0x0123);
- });
- checkWMTE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(array, 0, (short)0x0123, Void.class);
- });
- checkWMTE(() -> { // receiver primitive class
- boolean r = vh.weakCompareAndSetVolatile(0, 0, (short)0x0123, (short)0x0123);
- });
- checkWMTE(() -> { // index reference class
- boolean r = vh.weakCompareAndSetVolatile(array, Void.class, (short)0x0123, (short)0x0123);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(array, 0, (short)0x0123, (short)0x0123, Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkNPE(() -> { // null receiver
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeString.java Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeString.java Thu Sep 01 13:56:13 2016 -0700
@@ -353,6 +353,32 @@
// WeakCompareAndSet
// Incorrect argument types
checkNPE(() -> { // null receiver
+ boolean r = vh.weakCompareAndSetPlain(null, "foo", "foo");
+ });
+ checkCCE(() -> { // receiver reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, "foo", "foo");
+ });
+ checkCCE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(recv, Void.class, "foo");
+ });
+ checkCCE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(recv, "foo", Void.class);
+ });
+ checkWMTE(() -> { // receiver primitive class
+ boolean r = vh.weakCompareAndSetPlain(0, "foo", "foo");
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(recv, "foo", "foo", Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkNPE(() -> { // null receiver
boolean r = vh.weakCompareAndSet(null, "foo", "foo");
});
checkCCE(() -> { // receiver reference class
@@ -376,32 +402,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkNPE(() -> { // null receiver
- boolean r = vh.weakCompareAndSetVolatile(null, "foo", "foo");
- });
- checkCCE(() -> { // receiver reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, "foo", "foo");
- });
- checkCCE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(recv, Void.class, "foo");
- });
- checkCCE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(recv, "foo", Void.class);
- });
- checkWMTE(() -> { // receiver primitive class
- boolean r = vh.weakCompareAndSetVolatile(0, "foo", "foo");
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(recv, "foo", "foo", Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkNPE(() -> { // null receiver
@@ -952,6 +952,23 @@
// WeakCompareAndSet
// Incorrect argument types
checkCCE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, "foo");
+ });
+ checkCCE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain("foo", Void.class);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain("foo", "foo", Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkCCE(() -> { // expected reference class
boolean r = vh.weakCompareAndSet(Void.class, "foo");
});
checkCCE(() -> { // actual reference class
@@ -966,23 +983,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkCCE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, "foo");
- });
- checkCCE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile("foo", Void.class);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile("foo", "foo", Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkCCE(() -> { // expected reference class
@@ -1530,6 +1530,35 @@
// WeakCompareAndSet
// Incorrect argument types
checkNPE(() -> { // null receiver
+ boolean r = vh.weakCompareAndSetPlain(null, 0, "foo", "foo");
+ });
+ checkCCE(() -> { // receiver reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, 0, "foo", "foo");
+ });
+ checkCCE(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(array, 0, Void.class, "foo");
+ });
+ checkCCE(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(array, 0, "foo", Void.class);
+ });
+ checkWMTE(() -> { // receiver primitive class
+ boolean r = vh.weakCompareAndSetPlain(0, 0, "foo", "foo");
+ });
+ checkWMTE(() -> { // index reference class
+ boolean r = vh.weakCompareAndSetPlain(array, Void.class, "foo", "foo");
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(array, 0, "foo", "foo", Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkNPE(() -> { // null receiver
boolean r = vh.weakCompareAndSet(null, 0, "foo", "foo");
});
checkCCE(() -> { // receiver reference class
@@ -1556,35 +1585,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkNPE(() -> { // null receiver
- boolean r = vh.weakCompareAndSetVolatile(null, 0, "foo", "foo");
- });
- checkCCE(() -> { // receiver reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, 0, "foo", "foo");
- });
- checkCCE(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(array, 0, Void.class, "foo");
- });
- checkCCE(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(array, 0, "foo", Void.class);
- });
- checkWMTE(() -> { // receiver primitive class
- boolean r = vh.weakCompareAndSetVolatile(0, 0, "foo", "foo");
- });
- checkWMTE(() -> { // index reference class
- boolean r = vh.weakCompareAndSetVolatile(array, Void.class, "foo", "foo");
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(array, 0, "foo", "foo", Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkNPE(() -> { // null receiver
--- a/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestAccess.java.template Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestAccess.java.template Thu Sep 01 13:56:13 2016 -0700
@@ -104,8 +104,8 @@
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+ assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
- assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
@@ -116,8 +116,8 @@
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+ assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
- assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
@@ -323,11 +323,11 @@
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSet(recv, $value1$, $value2$);
+ boolean r = vh.weakCompareAndSetPlain(recv, $value1$, $value2$);
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(recv, $value1$, $value2$);
+ boolean r = vh.weakCompareAndSet(recv, $value1$, $value2$);
});
checkUOE(() -> {
@@ -467,11 +467,11 @@
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSet($value1$, $value2$);
+ boolean r = vh.weakCompareAndSetPlain($value1$, $value2$);
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSetVolatile($value1$, $value2$);
+ boolean r = vh.weakCompareAndSet($value1$, $value2$);
});
checkUOE(() -> {
@@ -642,11 +642,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(recv, $value1$, $value2$);
+ success = vh.weakCompareAndSetPlain(recv, $value1$, $value2$);
}
- assertEquals(success, true, "weakCompareAndSet $type$");
+ assertEquals(success, true, "weakCompareAndSetPlain $type$");
$type$ x = ($type$) vh.get(recv);
- assertEquals(x, $value2$, "weakCompareAndSet $type$ value");
+ assertEquals(x, $value2$, "weakCompareAndSetPlain $type$ value");
}
{
@@ -672,11 +672,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetVolatile(recv, $value2$, $value1$);
+ success = vh.weakCompareAndSet(recv, $value2$, $value1$);
}
- assertEquals(success, true, "weakCompareAndSetVolatile $type$");
+ assertEquals(success, true, "weakCompareAndSet $type$");
$type$ x = ($type$) vh.get(recv);
- assertEquals(x, $value1$, "weakCompareAndSetVolatile $type$ value");
+ assertEquals(x, $value1$, "weakCompareAndSet $type$ value");
}
// Compare set and get
@@ -844,11 +844,11 @@
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSet(recv, $value1$, $value2$);
+ boolean r = vh.weakCompareAndSetPlain(recv, $value1$, $value2$);
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(recv, $value1$, $value2$);
+ boolean r = vh.weakCompareAndSet(recv, $value1$, $value2$);
});
checkUOE(() -> {
@@ -1019,11 +1019,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet($value1$, $value2$);
+ success = vh.weakCompareAndSetPlain($value1$, $value2$);
}
- assertEquals(success, true, "weakCompareAndSet $type$");
+ assertEquals(success, true, "weakCompareAndSetPlain $type$");
$type$ x = ($type$) vh.get();
- assertEquals(x, $value2$, "weakCompareAndSet $type$ value");
+ assertEquals(x, $value2$, "weakCompareAndSetPlain $type$ value");
}
{
@@ -1049,11 +1049,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetRelease($value2$, $value1$);
+ success = vh.weakCompareAndSet($value2$, $value1$);
}
- assertEquals(success, true, "weakCompareAndSetVolatile $type$");
+ assertEquals(success, true, "weakCompareAndSet $type$");
$type$ x = ($type$) vh.get();
- assertEquals(x, $value1$, "weakCompareAndSetVolatile $type$");
+ assertEquals(x, $value1$, "weakCompareAndSet $type$");
}
// Compare set and get
@@ -1221,11 +1221,11 @@
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSet($value1$, $value2$);
+ boolean r = vh.weakCompareAndSetPlain($value1$, $value2$);
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSetVolatile($value1$, $value2$);
+ boolean r = vh.weakCompareAndSet($value1$, $value2$);
});
checkUOE(() -> {
@@ -1399,11 +1399,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(array, i, $value1$, $value2$);
+ success = vh.weakCompareAndSetPlain(array, i, $value1$, $value2$);
}
- assertEquals(success, true, "weakCompareAndSet $type$");
+ assertEquals(success, true, "weakCompareAndSetPlain $type$");
$type$ x = ($type$) vh.get(array, i);
- assertEquals(x, $value2$, "weakCompareAndSet $type$ value");
+ assertEquals(x, $value2$, "weakCompareAndSetPlain $type$ value");
}
{
@@ -1429,11 +1429,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSetVolatile(array, i, $value2$, $value1$);
+ success = vh.weakCompareAndSet(array, i, $value2$, $value1$);
}
- assertEquals(success, true, "weakCompareAndSetVolatile $type$");
+ assertEquals(success, true, "weakCompareAndSet $type$");
$type$ x = ($type$) vh.get(array, i);
- assertEquals(x, $value1$, "weakCompareAndSetVolatile $type$");
+ assertEquals(x, $value1$, "weakCompareAndSet $type$");
}
// Compare set and get
@@ -1605,11 +1605,11 @@
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSet(array, i, $value1$, $value2$);
+ boolean r = vh.weakCompareAndSetPlain(array, i, $value1$, $value2$);
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, i, $value1$, $value2$);
+ boolean r = vh.weakCompareAndSet(array, i, $value1$, $value2$);
});
checkUOE(() -> {
@@ -1742,11 +1742,11 @@
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, $value1$, $value2$);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, $value1$, $value2$);
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, $value1$, $value2$);
+ boolean r = vh.weakCompareAndSet(array, ci, $value1$, $value2$);
});
checkIOOBE(() -> {
--- a/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestByteArrayView.java.template Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestByteArrayView.java.template Thu Sep 01 13:56:13 2016 -0700
@@ -93,8 +93,8 @@
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+ assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
- assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
@@ -105,8 +105,8 @@
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+ assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
- assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
@@ -247,11 +247,11 @@
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkUOE(() -> {
@@ -371,11 +371,11 @@
});
checkROBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkROBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkROBE(() -> {
@@ -416,11 +416,11 @@
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkUOE(() -> {
@@ -563,11 +563,11 @@
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkUOE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkUOE(() -> {
@@ -702,11 +702,11 @@
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkIOOBE(() -> {
@@ -848,11 +848,11 @@
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkIOOBE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkIOOBE(() -> {
@@ -985,11 +985,11 @@
});
checkISE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkISE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkISE(() -> {
@@ -1124,11 +1124,11 @@
});
checkISE(() -> {
- boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
});
checkISE(() -> {
- boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+ boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
});
checkISE(() -> {
@@ -1312,11 +1312,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(array, i, VALUE_1, VALUE_2);
+ success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2);
}
- assertEquals(success, true, "weakCompareAndSet $type$");
+ assertEquals(success, true, "weakCompareAndSetPlain $type$");
$type$ x = ($type$) vh.get(array, i);
- assertEquals(x, VALUE_2, "weakCompareAndSet $type$ value");
+ assertEquals(x, VALUE_2, "weakCompareAndSetPlain $type$ value");
}
{
@@ -1340,10 +1340,13 @@
}
{
- boolean r = vh.weakCompareAndSetVolatile(array, i, VALUE_2, VALUE_1);
- assertEquals(r, true, "weakCompareAndSetVolatile $type$");
+ boolean success = false;
+ for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
+ success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1);
+ }
+ assertEquals(success, true, "weakCompareAndSet $type$");
$type$ x = ($type$) vh.get(array, i);
- assertEquals(x, VALUE_1, "weakCompareAndSetVolatile $type$ value");
+ assertEquals(x, VALUE_1, "weakCompareAndSet $type$");
}
// Compare set and get
@@ -1598,11 +1601,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = vh.weakCompareAndSet(array, i, VALUE_1, VALUE_2);
+ success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2);
}
- assertEquals(success, true, "weakCompareAndSet $type$");
+ assertEquals(success, true, "weakCompareAndSetPlain $type$");
$type$ x = ($type$) vh.get(array, i);
- assertEquals(x, VALUE_2, "weakCompareAndSet $type$ value");
+ assertEquals(x, VALUE_2, "weakCompareAndSetPlain $type$ value");
}
{
@@ -1626,10 +1629,13 @@
}
{
- boolean r = vh.weakCompareAndSetVolatile(array, i, VALUE_2, VALUE_1);
- assertEquals(r, true, "weakCompareAndSetVolatile $type$");
+ boolean success = false;
+ for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
+ success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1);
+ }
+ assertEquals(success, true, "weakCompareAndSet $type$");
$type$ x = ($type$) vh.get(array, i);
- assertEquals(x, VALUE_1, "weakCompareAndSetVolatile $type$ value");
+ assertEquals(x, VALUE_1, "weakCompareAndSet $type$");
}
// Compare set and get
--- a/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestMethodHandleAccess.java.template Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestMethodHandleAccess.java.template Thu Sep 01 13:56:13 2016 -0700
@@ -211,11 +211,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, $value1$, $value2$);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, $value1$, $value2$);
}
- assertEquals(success, true, "weakCompareAndSet $type$");
+ assertEquals(success, true, "weakCompareAndSetPlain $type$");
$type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
- assertEquals(x, $value2$, "weakCompareAndSet $type$ value");
+ assertEquals(x, $value2$, "weakCompareAndSetPlain $type$ value");
}
{
@@ -241,11 +241,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(recv, $value2$, $value1$);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, $value2$, $value1$);
}
- assertEquals(success, true, "weakCompareAndSetVolatile $type$");
+ assertEquals(success, true, "weakCompareAndSet $type$");
$type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
- assertEquals(x, $value1$, "weakCompareAndSetVolatile $type$");
+ assertEquals(x, $value1$, "weakCompareAndSet $type$");
}
// Compare set and get
@@ -506,11 +506,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact($value1$, $value2$);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact($value1$, $value2$);
}
- assertEquals(success, true, "weakCompareAndSet $type$");
+ assertEquals(success, true, "weakCompareAndSetPlain $type$");
$type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
- assertEquals(x, $value2$, "weakCompareAndSet $type$ value");
+ assertEquals(x, $value2$, "weakCompareAndSetPlain $type$ value");
}
{
@@ -536,11 +536,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact($value2$, $value1$);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact($value2$, $value1$);
}
- assertEquals(success, true, "weakCompareAndSetVolatile $type$");
+ assertEquals(success, true, "weakCompareAndSet $type$");
$type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
- assertEquals(x, $value1$, "weakCompareAndSetVolatile $type$");
+ assertEquals(x, $value1$, "weakCompareAndSet $type$");
}
// Compare set and get
@@ -826,11 +826,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, $value1$, $value2$);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, $value1$, $value2$);
}
- assertEquals(success, true, "weakCompareAndSet $type$");
+ assertEquals(success, true, "weakCompareAndSetPlain $type$");
$type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
- assertEquals(x, $value2$, "weakCompareAndSet $type$ value");
+ assertEquals(x, $value2$, "weakCompareAndSetPlain $type$ value");
}
{
@@ -856,11 +856,11 @@
{
boolean success = false;
for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
- success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(array, i, $value2$, $value1$);
+ success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, $value2$, $value1$);
}
- assertEquals(success, true, "weakCompareAndSetVolatile $type$");
+ assertEquals(success, true, "weakCompareAndSet $type$");
$type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
- assertEquals(x, $value1$, "weakCompareAndSetVolatile $type$");
+ assertEquals(x, $value1$, "weakCompareAndSet $type$");
}
// Compare set and get
--- a/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestMethodType.java.template Thu Sep 01 10:17:01 2016 -0700
+++ b/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestMethodType.java.template Thu Sep 01 13:56:13 2016 -0700
@@ -354,6 +354,32 @@
// WeakCompareAndSet
// Incorrect argument types
checkNPE(() -> { // null receiver
+ boolean r = vh.weakCompareAndSetPlain(null, $value1$, $value1$);
+ });
+ checkCCE(() -> { // receiver reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, $value1$, $value1$);
+ });
+ check{#if[String]?CCE:WMTE}(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(recv, Void.class, $value1$);
+ });
+ check{#if[String]?CCE:WMTE}(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(recv, $value1$, Void.class);
+ });
+ checkWMTE(() -> { // receiver primitive class
+ boolean r = vh.weakCompareAndSetPlain(0, $value1$, $value1$);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(recv, $value1$, $value1$, Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkNPE(() -> { // null receiver
boolean r = vh.weakCompareAndSet(null, $value1$, $value1$);
});
checkCCE(() -> { // receiver reference class
@@ -377,32 +403,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkNPE(() -> { // null receiver
- boolean r = vh.weakCompareAndSetVolatile(null, $value1$, $value1$);
- });
- checkCCE(() -> { // receiver reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, $value1$, $value1$);
- });
- check{#if[String]?CCE:WMTE}(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(recv, Void.class, $value1$);
- });
- check{#if[String]?CCE:WMTE}(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(recv, $value1$, Void.class);
- });
- checkWMTE(() -> { // receiver primitive class
- boolean r = vh.weakCompareAndSetVolatile(0, $value1$, $value1$);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(recv, $value1$, $value1$, Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkNPE(() -> { // null receiver
@@ -1391,6 +1391,23 @@
// WeakCompareAndSet
// Incorrect argument types
check{#if[String]?CCE:WMTE}(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, $value1$);
+ });
+ check{#if[String]?CCE:WMTE}(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain($value1$, Void.class);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain($value1$, $value1$, Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ check{#if[String]?CCE:WMTE}(() -> { // expected reference class
boolean r = vh.weakCompareAndSet(Void.class, $value1$);
});
check{#if[String]?CCE:WMTE}(() -> { // actual reference class
@@ -1405,23 +1422,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- check{#if[String]?CCE:WMTE}(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, $value1$);
- });
- check{#if[String]?CCE:WMTE}(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile($value1$, Void.class);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile($value1$, $value1$, Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
check{#if[String]?CCE:WMTE}(() -> { // expected reference class
@@ -2279,6 +2279,35 @@
// WeakCompareAndSet
// Incorrect argument types
checkNPE(() -> { // null receiver
+ boolean r = vh.weakCompareAndSetPlain(null, 0, $value1$, $value1$);
+ });
+ checkCCE(() -> { // receiver reference class
+ boolean r = vh.weakCompareAndSetPlain(Void.class, 0, $value1$, $value1$);
+ });
+ check{#if[String]?CCE:WMTE}(() -> { // expected reference class
+ boolean r = vh.weakCompareAndSetPlain(array, 0, Void.class, $value1$);
+ });
+ check{#if[String]?CCE:WMTE}(() -> { // actual reference class
+ boolean r = vh.weakCompareAndSetPlain(array, 0, $value1$, Void.class);
+ });
+ checkWMTE(() -> { // receiver primitive class
+ boolean r = vh.weakCompareAndSetPlain(0, 0, $value1$, $value1$);
+ });
+ checkWMTE(() -> { // index reference class
+ boolean r = vh.weakCompareAndSetPlain(array, Void.class, $value1$, $value1$);
+ });
+ // Incorrect arity
+ checkWMTE(() -> { // 0
+ boolean r = vh.weakCompareAndSetPlain();
+ });
+ checkWMTE(() -> { // >
+ boolean r = vh.weakCompareAndSetPlain(array, 0, $value1$, $value1$, Void.class);
+ });
+
+
+ // WeakCompareAndSetVolatile
+ // Incorrect argument types
+ checkNPE(() -> { // null receiver
boolean r = vh.weakCompareAndSet(null, 0, $value1$, $value1$);
});
checkCCE(() -> { // receiver reference class
@@ -2305,35 +2334,6 @@
});
- // WeakCompareAndSetVolatile
- // Incorrect argument types
- checkNPE(() -> { // null receiver
- boolean r = vh.weakCompareAndSetVolatile(null, 0, $value1$, $value1$);
- });
- checkCCE(() -> { // receiver reference class
- boolean r = vh.weakCompareAndSetVolatile(Void.class, 0, $value1$, $value1$);
- });
- check{#if[String]?CCE:WMTE}(() -> { // expected reference class
- boolean r = vh.weakCompareAndSetVolatile(array, 0, Void.class, $value1$);
- });
- check{#if[String]?CCE:WMTE}(() -> { // actual reference class
- boolean r = vh.weakCompareAndSetVolatile(array, 0, $value1$, Void.class);
- });
- checkWMTE(() -> { // receiver primitive class
- boolean r = vh.weakCompareAndSetVolatile(0, 0, $value1$, $value1$);
- });
- checkWMTE(() -> { // index reference class
- boolean r = vh.weakCompareAndSetVolatile(array, Void.class, $value1$, $value1$);
- });
- // Incorrect arity
- checkWMTE(() -> { // 0
- boolean r = vh.weakCompareAndSetVolatile();
- });
- checkWMTE(() -> { // >
- boolean r = vh.weakCompareAndSetVolatile(array, 0, $value1$, $value1$, Void.class);
- });
-
-
// WeakCompareAndSetAcquire
// Incorrect argument types
checkNPE(() -> { // null receiver