src/hotspot/share/runtime/deoptimization.cpp
changeset 59252 623722a6aeb9
parent 59056 15936b142f86
child 59290 97d13893ec3c
--- a/src/hotspot/share/runtime/deoptimization.cpp	Mon Nov 25 12:32:40 2019 +0100
+++ b/src/hotspot/share/runtime/deoptimization.cpp	Mon Nov 25 12:33:15 2019 +0100
@@ -869,7 +869,7 @@
   static BoxCache<PrimitiveType, CacheType, BoxType>* singleton(Thread* thread) {
     if (_singleton == NULL) {
       BoxCache<PrimitiveType, CacheType, BoxType>* s = new BoxCache<PrimitiveType, CacheType, BoxType>(thread);
-      if (!Atomic::replace_if_null(s, &_singleton)) {
+      if (!Atomic::replace_if_null(&_singleton, s)) {
         delete s;
       }
     }
@@ -923,7 +923,7 @@
   static BooleanBoxCache* singleton(Thread* thread) {
     if (_singleton == NULL) {
       BooleanBoxCache* s = new BooleanBoxCache(thread);
-      if (!Atomic::replace_if_null(s, &_singleton)) {
+      if (!Atomic::replace_if_null(&_singleton, s)) {
         delete s;
       }
     }