src/share/vm/ci/ciInstanceKlass.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6934604 Cdiff src/share/vm/ci/ciInstanceKlass.cpp

src/share/vm/ci/ciInstanceKlass.cpp

Print this page

        

*** 209,225 **** return equals(CURRENT_ENV->Object_klass()); } // ------------------------------------------------------------------ // ciInstanceKlass::uses_default_loader ! bool ciInstanceKlass::uses_default_loader() { // Note: We do not need to resolve the handle or enter the VM // in order to test null-ness. return _loader == NULL; } // ------------------------------------------------------------------ // ciInstanceKlass::is_in_package // // Is this klass in the given package? bool ciInstanceKlass::is_in_package(const char* packagename, int len) { // To avoid class loader mischief, this test always rejects application classes. --- 209,254 ---- return equals(CURRENT_ENV->Object_klass()); } // ------------------------------------------------------------------ // ciInstanceKlass::uses_default_loader ! bool ciInstanceKlass::uses_default_loader() const { // Note: We do not need to resolve the handle or enter the VM // in order to test null-ness. return _loader == NULL; } // ------------------------------------------------------------------ + + /** + * Return basic type of boxed value for box klass or T_OBJECT if not. + */ + BasicType ciInstanceKlass::box_klass_type() const { + if (uses_default_loader() && is_loaded()) { + return SystemDictionary::box_klass_type(get_Klass()); + } else { + return T_OBJECT; + } + } + + /** + * Is this boxing klass? + */ + bool ciInstanceKlass::is_box_klass() const { + return is_java_primitive(box_klass_type()); + } + + /** + * Is this boxed value offset? + */ + bool ciInstanceKlass::is_boxed_value_offset(int offset) const { + BasicType bt = box_klass_type(); + return is_java_primitive(bt) && + (offset == java_lang_boxing_object::value_offset_in_bytes(bt)); + } + + // ------------------------------------------------------------------ // ciInstanceKlass::is_in_package // // Is this klass in the given package? bool ciInstanceKlass::is_in_package(const char* packagename, int len) { // To avoid class loader mischief, this test always rejects application classes.
src/share/vm/ci/ciInstanceKlass.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File