jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestByteArrayView.java.template
changeset 38368 c8eb5d6812c5
parent 38358 cb99c6d2af1b
parent 38328 40435a469d25
child 38429 0fd11baf20c3
equal deleted inserted replaced
38367:21801e8e9344 38368:c8eb5d6812c5
    25  * @test
    25  * @test
    26  * @bug 8154556
    26  * @bug 8154556
    27  * @run testng/othervm -Diters=20000 -XX:TieredStopAtLevel=1 VarHandleTestByteArrayAs$Type$
    27  * @run testng/othervm -Diters=20000 -XX:TieredStopAtLevel=1 VarHandleTestByteArrayAs$Type$
    28  * @run testng/othervm -Diters=20000                         VarHandleTestByteArrayAs$Type$
    28  * @run testng/othervm -Diters=20000                         VarHandleTestByteArrayAs$Type$
    29  * @run testng/othervm -Diters=20000 -XX:-TieredCompilation  VarHandleTestByteArrayAs$Type$
    29  * @run testng/othervm -Diters=20000 -XX:-TieredCompilation  VarHandleTestByteArrayAs$Type$
       
    30  * @run testng/othervm -Diters=20000 -Djava.lang.invoke.VarHandle.VAR_HANDLE_GUARDS=false VarHandleTestByteArrayAs$Type$
    30  */
    31  */
    31 
    32 
    32 import org.testng.annotations.DataProvider;
    33 import org.testng.annotations.DataProvider;
    33 import org.testng.annotations.Test;
    34 import org.testng.annotations.Test;
    34 
    35 
   309             });
   310             });
   310 
   311 
   311             checkROBE(() -> {
   312             checkROBE(() -> {
   312                 $type$ o = ($type$) vh.getAndSet(array, ci, VALUE_1);
   313                 $type$ o = ($type$) vh.getAndSet(array, ci, VALUE_1);
   313             });
   314             });
       
   315 
       
   316 #else[CAS]
   314             checkUOE(() -> {
   317             checkUOE(() -> {
   315                 boolean r = vh.compareAndSet(array, ci, VALUE_1, VALUE_2);
   318                 boolean r = vh.compareAndSet(array, ci, VALUE_1, VALUE_2);
   316             });
   319             });
   317 #else[CAS]
   320 
   318             checkUOE(() -> {
   321             checkUOE(() -> {
   319                 $type$ r = ($type$) vh.compareAndExchangeVolatile(array, ci, VALUE_2, VALUE_1);
   322                 $type$ r = ($type$) vh.compareAndExchangeVolatile(array, ci, VALUE_2, VALUE_1);
   320             });
   323             });
   321 
   324 
   322             checkUOE(() -> {
   325             checkUOE(() -> {