src/hotspot/share/runtime/deoptimization.cpp
changeset 59252 623722a6aeb9
parent 59056 15936b142f86
child 59290 97d13893ec3c
equal deleted inserted replaced
59251:4cbfa5077d68 59252:623722a6aeb9
   867   }
   867   }
   868 public:
   868 public:
   869   static BoxCache<PrimitiveType, CacheType, BoxType>* singleton(Thread* thread) {
   869   static BoxCache<PrimitiveType, CacheType, BoxType>* singleton(Thread* thread) {
   870     if (_singleton == NULL) {
   870     if (_singleton == NULL) {
   871       BoxCache<PrimitiveType, CacheType, BoxType>* s = new BoxCache<PrimitiveType, CacheType, BoxType>(thread);
   871       BoxCache<PrimitiveType, CacheType, BoxType>* s = new BoxCache<PrimitiveType, CacheType, BoxType>(thread);
   872       if (!Atomic::replace_if_null(s, &_singleton)) {
   872       if (!Atomic::replace_if_null(&_singleton, s)) {
   873         delete s;
   873         delete s;
   874       }
   874       }
   875     }
   875     }
   876     return _singleton;
   876     return _singleton;
   877   }
   877   }
   921   }
   921   }
   922 public:
   922 public:
   923   static BooleanBoxCache* singleton(Thread* thread) {
   923   static BooleanBoxCache* singleton(Thread* thread) {
   924     if (_singleton == NULL) {
   924     if (_singleton == NULL) {
   925       BooleanBoxCache* s = new BooleanBoxCache(thread);
   925       BooleanBoxCache* s = new BooleanBoxCache(thread);
   926       if (!Atomic::replace_if_null(s, &_singleton)) {
   926       if (!Atomic::replace_if_null(&_singleton, s)) {
   927         delete s;
   927         delete s;
   928       }
   928       }
   929     }
   929     }
   930     return _singleton;
   930     return _singleton;
   931   }
   931   }