src/share/vm/oops/instanceKlass.cpp

changeset 6132
22eaa15b7960
parent 6105
6e1826d5c23e
child 6145
379f11bc04fc
child 6149
9fc985481d78
child 6493
3205e78d8193
     1.1 --- a/src/share/vm/oops/instanceKlass.cpp	Sat Nov 23 12:25:13 2013 +0100
     1.2 +++ b/src/share/vm/oops/instanceKlass.cpp	Tue Nov 26 09:52:22 2013 -0500
     1.3 @@ -1051,6 +1051,18 @@
     1.4    return false;
     1.5  }
     1.6  
     1.7 +bool InstanceKlass::is_same_or_direct_interface(Klass *k) const {
     1.8 +  // Verify direct super interface
     1.9 +  if (this == k) return true;
    1.10 +  assert(k->is_interface(), "should be an interface class");
    1.11 +  for (int i = 0; i < local_interfaces()->length(); i++) {
    1.12 +    if (local_interfaces()->at(i) == k) {
    1.13 +      return true;
    1.14 +    }
    1.15 +  }
    1.16 +  return false;
    1.17 +}
    1.18 +
    1.19  objArrayOop InstanceKlass::allocate_objArray(int n, int length, TRAPS) {
    1.20    if (length < 0) THROW_0(vmSymbols::java_lang_NegativeArraySizeException());
    1.21    if (length > arrayOopDesc::max_array_length(T_OBJECT)) {

mercurial