diff --git a/src/hotspot/share/oops/access.hpp b/src/hotspot/share/oops/access.hpp index 7c9c38a..187941a 100644 --- a/src/hotspot/share/oops/access.hpp +++ b/src/hotspot/share/oops/access.hpp @@ -92,119 +92,6 @@ // access.inline.hpp. The accesses that are allowed through the access.hpp file // must be instantiated in access.cpp using the INSTANTIATE_HPP_ACCESS macro. -namespace AccessInternal { - template - void store_at(oop base, ptrdiff_t offset, T value); - - template - T load_at(oop base, ptrdiff_t offset); - - template - T atomic_cmpxchg_at(T new_value, oop base, ptrdiff_t offset, T compare_value); - - template - T atomic_xchg_at(T new_value, oop base, ptrdiff_t offset); - - template - void store(P* addr, T value); - - template - T load(P* addr); - - template - T atomic_cmpxchg(T new_value, P* addr, T compare_value); - - template - T atomic_xchg(T new_value, P* addr); - - template - bool arraycopy(arrayOop src_obj, arrayOop dst_obj, T *src, T *dst, size_t length); - - template - void clone(oop src, oop dst, size_t size); - - template - oop resolve(oop src); - - template - bool equals(oop o1, oop o2); - - // Infer the type that should be returned from a load. - template - class OopLoadProxy: public StackObj { - private: - P *const _addr; - public: - OopLoadProxy(P* addr) : _addr(addr) {} - - inline operator oop() { - return load(_addr); - } - - inline operator narrowOop() { - return load(_addr); - } - - template - inline bool operator ==(const T& other) const { - return load(_addr) == other; - } - - template - inline bool operator !=(const T& other) const { - return load(_addr) != other; - } - }; - - // Infer the type that should be returned from a load_at. - template - class LoadAtProxy: public StackObj { - private: - const oop _base; - const ptrdiff_t _offset; - public: - LoadAtProxy(oop base, ptrdiff_t offset) : _base(base), _offset(offset) {} - - template - inline operator T() const { - return load_at(_base, _offset); - } - - template - inline bool operator ==(const T& other) const { return load_at(_base, _offset) == other; } - - template - inline bool operator !=(const T& other) const { return load_at(_base, _offset) != other; } - }; - - template - class OopLoadAtProxy: public StackObj { - private: - const oop _base; - const ptrdiff_t _offset; - public: - OopLoadAtProxy(oop base, ptrdiff_t offset) : _base(base), _offset(offset) {} - - inline operator oop() const { - return load_at(_base, _offset); - } - - inline operator narrowOop() const { - return load_at(_base, _offset); - } - - template - inline bool operator ==(const T& other) const { - return load_at(_base, _offset) == other; - } - - template - inline bool operator !=(const T& other) const { - return load_at(_base, _offset) != other; - } - }; -} - template class Access: public AllStatic { // This function asserts that if an access gets passed in a decorator outside