src/hotspot/share/oops/klass.inline.hpp
changeset 47998 fb0275c320a0
parent 47216 71c04702a3d5
child 49592 77fb0be7d19f
equal deleted inserted replaced
47997:55c43e677ded 47998:fb0275c320a0
    69 
    69 
    70 inline Klass* Klass::decode_klass(narrowKlass v) {
    70 inline Klass* Klass::decode_klass(narrowKlass v) {
    71   return is_null(v) ? (Klass*)NULL : decode_klass_not_null(v);
    71   return is_null(v) ? (Klass*)NULL : decode_klass_not_null(v);
    72 }
    72 }
    73 
    73 
       
    74 template <typename T>
       
    75 bool Klass::is_instanceof_or_null(T element) {
       
    76   if (oopDesc::is_null(element)) {
       
    77     return true;
       
    78   }
       
    79   oop obj = oopDesc::decode_heap_oop_not_null(element);
       
    80   return obj->klass()->is_subtype_of(this);
       
    81 }
       
    82 
    74 #endif // SHARE_VM_OOPS_KLASS_INLINE_HPP
    83 #endif // SHARE_VM_OOPS_KLASS_INLINE_HPP