src/hotspot/share/oops/weakHandle.inline.hpp
changeset 50599 ecc2af326b5f
parent 50445 bd6b78feb6a3
child 53244 9807daeb47c4
equal deleted inserted replaced
50598:8d9d4d91be7f 50599:ecc2af326b5f
    29 #include "oops/access.inline.hpp"
    29 #include "oops/access.inline.hpp"
    30 
    30 
    31 template <WeakHandleType T>
    31 template <WeakHandleType T>
    32 oop WeakHandle<T>::resolve() const {
    32 oop WeakHandle<T>::resolve() const {
    33   assert(!is_null(), "Must be created");
    33   assert(!is_null(), "Must be created");
    34   return RootAccess<ON_PHANTOM_OOP_REF>::oop_load(_obj);
    34   return NativeAccess<ON_PHANTOM_OOP_REF>::oop_load(_obj);
    35 }
    35 }
    36 
    36 
    37 template <WeakHandleType T>
    37 template <WeakHandleType T>
    38 oop WeakHandle<T>::peek() const {
    38 oop WeakHandle<T>::peek() const {
    39   assert(!is_null(), "Must be created");
    39   assert(!is_null(), "Must be created");
    40   return RootAccess<ON_PHANTOM_OOP_REF | AS_NO_KEEPALIVE>::oop_load(_obj);
    40   return NativeAccess<ON_PHANTOM_OOP_REF | AS_NO_KEEPALIVE>::oop_load(_obj);
    41 }
    41 }
    42 
    42 
    43 template <WeakHandleType T>
    43 template <WeakHandleType T>
    44 void WeakHandle<T>::replace(oop with_obj) {
    44 void WeakHandle<T>::replace(oop with_obj) {
    45   RootAccess<ON_PHANTOM_OOP_REF>::oop_store(_obj, with_obj);
    45   NativeAccess<ON_PHANTOM_OOP_REF>::oop_store(_obj, with_obj);
    46 }
    46 }
    47 
    47 
    48 #endif // SHARE_VM_OOPS_WEAKHANDLE_INLINE_HPP
    48 #endif // SHARE_VM_OOPS_WEAKHANDLE_INLINE_HPP
    49 
    49