Mercurial > hg > graal-jvmci-8
comparison src/share/vm/oops/instanceKlass.cpp @ 652:4aaa9f5e02a8
4766230: Hotspot vtable inconsistencies cause core dumps. 6579515. 6582242.
Reviewed-by: kamg, coleenp
author | acorn |
---|---|
date | Wed, 18 Mar 2009 17:20:57 -0400 |
parents | 98cb887364d3 |
children | d3676b4cb78c |
comparison
equal
deleted
inserted
replaced
651:8ce995316d10 | 652:4aaa9f5e02a8 |
---|---|
1857 return UTF8::equal(name1, length1, name2, length2); | 1857 return UTF8::equal(name1, length1, name2, length2); |
1858 } | 1858 } |
1859 } | 1859 } |
1860 } | 1860 } |
1861 | 1861 |
1862 // Returns true iff super_method can be overridden by a method in targetclassname | |
1863 // See JSL 3rd edition 8.4.6.1 | |
1864 // Assumes name-signature match | |
1865 // "this" is instanceKlass of super_method which must exist | |
1866 // note that the instanceKlass of the method in the targetclassname has not always been created yet | |
1867 bool instanceKlass::is_override(methodHandle super_method, Handle targetclassloader, symbolHandle targetclassname, TRAPS) { | |
1868 // Private methods can not be overridden | |
1869 if (super_method->is_private()) { | |
1870 return false; | |
1871 } | |
1872 // If super method is accessible, then override | |
1873 if ((super_method->is_protected()) || | |
1874 (super_method->is_public())) { | |
1875 return true; | |
1876 } | |
1877 // Package-private methods are not inherited outside of package | |
1878 assert(super_method->is_package_private(), "must be package private"); | |
1879 return(is_same_class_package(targetclassloader(), targetclassname())); | |
1880 } | |
1862 | 1881 |
1863 jint instanceKlass::compute_modifier_flags(TRAPS) const { | 1882 jint instanceKlass::compute_modifier_flags(TRAPS) const { |
1864 klassOop k = as_klassOop(); | 1883 klassOop k = as_klassOop(); |
1865 jint access = access_flags().as_int(); | 1884 jint access = access_flags().as_int(); |
1866 | 1885 |