Mercurial > hg > truffle
comparison src/share/vm/classfile/systemDictionary.cpp @ 3464:be4ca325525a
Merge.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 27 Jul 2011 17:32:44 -0700 |
parents | 0654ee04b214 81d815b05abb |
children | 04b9a2566eec |
comparison
equal
deleted
inserted
replaced
3239:7c4b4daac19b | 3464:be4ca325525a |
---|---|
1253 objArrayHandle methods (THREAD, ik->methods()); | 1253 objArrayHandle methods (THREAD, ik->methods()); |
1254 int num_methods = methods->length(); | 1254 int num_methods = methods->length(); |
1255 for (int index2 = 0; index2 < num_methods; ++index2) { | 1255 for (int index2 = 0; index2 < num_methods; ++index2) { |
1256 methodHandle m(THREAD, methodOop(methods->obj_at(index2))); | 1256 methodHandle m(THREAD, methodOop(methods->obj_at(index2))); |
1257 m()->link_method(m, CHECK_(nh)); | 1257 m()->link_method(m, CHECK_(nh)); |
1258 } | |
1259 if (JvmtiExport::has_redefined_a_class()) { | |
1260 // Reinitialize vtable because RedefineClasses may have changed some | |
1261 // entries in this vtable for super classes so the CDS vtable might | |
1262 // point to old or obsolete entries. RedefineClasses doesn't fix up | |
1263 // vtables in the shared system dictionary, only the main one. | |
1264 // It also redefines the itable too so fix that too. | |
1265 ResourceMark rm(THREAD); | |
1266 ik->vtable()->initialize_vtable(false, CHECK_(nh)); | |
1267 ik->itable()->initialize_itable(false, CHECK_(nh)); | |
1258 } | 1268 } |
1259 } | 1269 } |
1260 | 1270 |
1261 if (TraceClassLoading) { | 1271 if (TraceClassLoading) { |
1262 ResourceMark rm; | 1272 ResourceMark rm; |
2352 if (found_on_bcp) { | 2362 if (found_on_bcp) { |
2353 MutexLocker ml(SystemDictionary_lock, Thread::current()); | 2363 MutexLocker ml(SystemDictionary_lock, Thread::current()); |
2354 spe = invoke_method_table()->find_entry(index, hash, signature, name_id); | 2364 spe = invoke_method_table()->find_entry(index, hash, signature, name_id); |
2355 if (spe == NULL) | 2365 if (spe == NULL) |
2356 spe = invoke_method_table()->add_entry(index, hash, signature, name_id); | 2366 spe = invoke_method_table()->add_entry(index, hash, signature, name_id); |
2357 if (spe->property_oop() == NULL) | 2367 if (spe->property_oop() == NULL) { |
2358 spe->set_property_oop(m()); | 2368 spe->set_property_oop(m()); |
2369 // Link m to his method type, if it is suitably generic. | |
2370 oop mtform = java_lang_invoke_MethodType::form(mt()); | |
2371 if (mtform != NULL && mt() == java_lang_invoke_MethodTypeForm::erasedType(mtform) | |
2372 // vmlayout must be an invokeExact: | |
2373 && name_id == vmSymbols::VM_SYMBOL_ENUM_NAME(invokeExact_name) | |
2374 && java_lang_invoke_MethodTypeForm::vmlayout_offset_in_bytes() > 0) { | |
2375 java_lang_invoke_MethodTypeForm::init_vmlayout(mtform, m()); | |
2376 } | |
2377 } | |
2359 } else { | 2378 } else { |
2360 non_cached_result = m; | 2379 non_cached_result = m; |
2361 } | 2380 } |
2362 } | 2381 } |
2363 if (spe != NULL && spe->property_oop() != NULL) { | 2382 if (spe != NULL && spe->property_oop() != NULL) { |