Mercurial > hg > graal-jvmci-8
comparison src/share/vm/oops/instanceKlass.cpp @ 13451:02f27ecb4f3a
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 18 Dec 2013 00:00:24 +0100 |
parents | 096c224171c4 ad72068ac41e |
children | b270b954ba9a |
comparison
equal
deleted
inserted
replaced
13371:4db09b7304da | 13451:02f27ecb4f3a |
---|---|
1049 } | 1049 } |
1050 } | 1050 } |
1051 return false; | 1051 return false; |
1052 } | 1052 } |
1053 | 1053 |
1054 bool InstanceKlass::is_same_or_direct_interface(Klass *k) const { | |
1055 // Verify direct super interface | |
1056 if (this == k) return true; | |
1057 assert(k->is_interface(), "should be an interface class"); | |
1058 for (int i = 0; i < local_interfaces()->length(); i++) { | |
1059 if (local_interfaces()->at(i) == k) { | |
1060 return true; | |
1061 } | |
1062 } | |
1063 return false; | |
1064 } | |
1065 | |
1054 objArrayOop InstanceKlass::allocate_objArray(int n, int length, TRAPS) { | 1066 objArrayOop InstanceKlass::allocate_objArray(int n, int length, TRAPS) { |
1055 if (length < 0) THROW_0(vmSymbols::java_lang_NegativeArraySizeException()); | 1067 if (length < 0) THROW_0(vmSymbols::java_lang_NegativeArraySizeException()); |
1056 if (length > arrayOopDesc::max_array_length(T_OBJECT)) { | 1068 if (length > arrayOopDesc::max_array_length(T_OBJECT)) { |
1057 report_java_out_of_memory("Requested array size exceeds VM limit"); | 1069 report_java_out_of_memory("Requested array size exceeds VM limit"); |
1058 JvmtiExport::post_array_size_exhausted(); | 1070 JvmtiExport::post_array_size_exhausted(); |
1411 } | 1423 } |
1412 | 1424 |
1413 // find_method looks up the name/signature in the local methods array | 1425 // find_method looks up the name/signature in the local methods array |
1414 Method* InstanceKlass::find_method(Symbol* name, Symbol* signature) const { | 1426 Method* InstanceKlass::find_method(Symbol* name, Symbol* signature) const { |
1415 return InstanceKlass::find_method(methods(), name, signature); | 1427 return InstanceKlass::find_method(methods(), name, signature); |
1428 } | |
1429 | |
1430 // find_instance_method looks up the name/signature in the local methods array | |
1431 // and skips over static methods | |
1432 Method* InstanceKlass::find_instance_method( | |
1433 Array<Method*>* methods, Symbol* name, Symbol* signature) { | |
1434 Method* meth = InstanceKlass::find_method(methods, name, signature); | |
1435 if (meth != NULL && meth->is_static()) { | |
1436 meth = NULL; | |
1437 } | |
1438 return meth; | |
1416 } | 1439 } |
1417 | 1440 |
1418 // find_method looks up the name/signature in the local methods array | 1441 // find_method looks up the name/signature in the local methods array |
1419 Method* InstanceKlass::find_method( | 1442 Method* InstanceKlass::find_method( |
1420 Array<Method*>* methods, Symbol* name, Symbol* signature) { | 1443 Array<Method*>* methods, Symbol* name, Symbol* signature) { |
2155 int size = size_helper(); | 2178 int size = size_helper(); |
2156 InstanceKlass_OOP_MAP_ITERATE( \ | 2179 InstanceKlass_OOP_MAP_ITERATE( \ |
2157 obj, \ | 2180 obj, \ |
2158 MarkSweep::adjust_pointer(p), \ | 2181 MarkSweep::adjust_pointer(p), \ |
2159 assert_is_in) | 2182 assert_is_in) |
2160 MarkSweep::adjust_klass(obj->klass()); | |
2161 return size; | 2183 return size; |
2162 } | 2184 } |
2163 | 2185 |
2164 #if INCLUDE_ALL_GCS | 2186 #if INCLUDE_ALL_GCS |
2165 void InstanceKlass::oop_push_contents(PSPromotionManager* pm, oop obj) { | 2187 void InstanceKlass::oop_push_contents(PSPromotionManager* pm, oop obj) { |
2175 int size = size_helper(); | 2197 int size = size_helper(); |
2176 InstanceKlass_OOP_MAP_ITERATE( \ | 2198 InstanceKlass_OOP_MAP_ITERATE( \ |
2177 obj, \ | 2199 obj, \ |
2178 PSParallelCompact::adjust_pointer(p), \ | 2200 PSParallelCompact::adjust_pointer(p), \ |
2179 assert_is_in) | 2201 assert_is_in) |
2180 obj->update_header(cm); | |
2181 return size; | 2202 return size; |
2182 } | 2203 } |
2183 | 2204 |
2184 #endif // INCLUDE_ALL_GCS | 2205 #endif // INCLUDE_ALL_GCS |
2185 | 2206 |