< prev index next >
src/hotspot/share/runtime/deoptimization.cpp
Print this page
@@ -867,11 +867,11 @@
}
public:
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;
}
}
return _singleton;
}
@@ -921,11 +921,11 @@
}
public:
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;
}
}
return _singleton;
}
< prev index next >