< prev index next >

src/hotspot/share/oops/klass.inline.hpp

Print this page

        

*** 28,38 **** #include "memory/universe.hpp" #include "oops/klass.hpp" #include "oops/markOop.hpp" inline void Klass::set_prototype_header(markOop header) { ! assert(!header->has_bias_pattern() || is_instance_klass(), "biased locking currently only supported for Java instances"); _prototype_header = header; } inline bool Klass::is_null(Klass* obj) { return obj == NULL; } inline bool Klass::is_null(narrowKlass obj) { return obj == 0; } --- 28,38 ---- #include "memory/universe.hpp" #include "oops/klass.hpp" #include "oops/markOop.hpp" inline void Klass::set_prototype_header(markOop header) { ! assert(!header->has_bias_pattern() || (is_instance_klass() && (!is_value())), "biased locking currently only supported for Java instances"); _prototype_header = header; } inline bool Klass::is_null(Klass* obj) { return obj == NULL; } inline bool Klass::is_null(narrowKlass obj) { return obj == 0; }
*** 69,78 **** --- 69,86 ---- inline Klass* Klass::decode_klass(narrowKlass v) { return is_null(v) ? (Klass*)NULL : decode_klass_not_null(v); } + inline bool Klass::decode_ptr_is_value_type(narrowKlass v) { + return (v & Universe::oop_metadata_valuetype_mask()) != 0; + } + + inline bool Klass::ptr_is_value_type(Klass* v) { + return ((uintptr_t)v & KlassPtrValueTypeMask) != 0; + } + template <typename T> bool Klass::is_instanceof_or_null(T element) { if (oopDesc::is_null(element)) { return true; }
< prev index next >