< prev index next >
src/hotspot/share/runtime/handles.hpp
Print this page
rev 49211 : 8199472: Fix non-PCH build after JDK-8199319
*** 70,80 ****
oop non_null_obj() const { assert(_handle != NULL, "resolving NULL handle"); return *_handle; }
public:
// Constructors
Handle() { _handle = NULL; }
! Handle(Thread* thread, oop obj);
// General access
oop operator () () const { return obj(); }
oop operator -> () const { return non_null_obj(); }
bool operator == (oop o) const { return obj() == o; }
--- 70,80 ----
oop non_null_obj() const { assert(_handle != NULL, "resolving NULL handle"); return *_handle; }
public:
// Constructors
Handle() { _handle = NULL; }
! inline Handle(Thread* thread, oop obj);
// General access
oop operator () () const { return obj(); }
oop operator -> () const { return non_null_obj(); }
bool operator == (oop o) const { return obj() == o; }
*** 106,118 ****
type##Oop non_null_obj() const { return (type##Oop)Handle::non_null_obj(); } \
\
public: \
/* Constructors */ \
type##Handle () : Handle() {} \
! type##Handle (Thread* thread, type##Oop obj) : Handle(thread, (oop)obj) { \
! assert(is_null() || ((oop)obj)->is_a(), "illegal type"); \
! } \
\
/* Operators for ease of use */ \
type##Oop operator () () const { return obj(); } \
type##Oop operator -> () const { return non_null_obj(); } \
};
--- 106,116 ----
type##Oop non_null_obj() const { return (type##Oop)Handle::non_null_obj(); } \
\
public: \
/* Constructors */ \
type##Handle () : Handle() {} \
! inline type##Handle (Thread* thread, type##Oop obj); \
\
/* Operators for ease of use */ \
type##Oop operator () () const { return obj(); } \
type##Oop operator -> () const { return non_null_obj(); } \
};
< prev index next >