Mercurial > hg > truffle
diff src/share/vm/oops/instanceKlass.cpp @ 17478:e254e5940c19
Merge
author | kizune |
---|---|
date | Thu, 05 Dec 2013 16:37:29 +0400 |
parents | 22eaa15b7960 |
children | 379f11bc04fc 9fc985481d78 3205e78d8193 |
line wrap: on
line diff
--- a/src/share/vm/oops/instanceKlass.cpp Tue Dec 03 14:13:06 2013 +0400 +++ b/src/share/vm/oops/instanceKlass.cpp Thu Dec 05 16:37:29 2013 +0400 @@ -1051,6 +1051,18 @@ return false; } +bool InstanceKlass::is_same_or_direct_interface(Klass *k) const { + // Verify direct super interface + if (this == k) return true; + assert(k->is_interface(), "should be an interface class"); + for (int i = 0; i < local_interfaces()->length(); i++) { + if (local_interfaces()->at(i) == k) { + return true; + } + } + return false; +} + objArrayOop InstanceKlass::allocate_objArray(int n, int length, TRAPS) { if (length < 0) THROW_0(vmSymbols::java_lang_NegativeArraySizeException()); if (length > arrayOopDesc::max_array_length(T_OBJECT)) {