comparison src/share/vm/classfile/systemDictionary.cpp @ 1135:e66fd840cb6b

6893081: method handle & invokedynamic code needs additional cleanup (post 6815692, 6858164) Summary: During the work for 6829187 we have fixed a number of basic bugs which are logically grouped with 6815692 and 6858164 but which must be reviewed and pushed separately. Reviewed-by: kvn, never
author twisti
date Mon, 04 Jan 2010 18:38:08 +0100
parents 1920bd911283
children 4ce7240d622c
comparison
equal deleted inserted replaced
1134:0910903272e5 1135:e66fd840cb6b
1982 if (_well_known_klasses[meth_group_start] == NULL) { 1982 if (_well_known_klasses[meth_group_start] == NULL) {
1983 // Skip the rest of the method handle classes, if MethodHandle is not loaded. 1983 // Skip the rest of the method handle classes, if MethodHandle is not loaded.
1984 scan = WKID(meth_group_end+1); 1984 scan = WKID(meth_group_end+1);
1985 } 1985 }
1986 WKID indy_group_start = WK_KLASS_ENUM_NAME(Linkage_klass); 1986 WKID indy_group_start = WK_KLASS_ENUM_NAME(Linkage_klass);
1987 WKID indy_group_end = WK_KLASS_ENUM_NAME(Dynamic_klass); 1987 WKID indy_group_end = WK_KLASS_ENUM_NAME(InvokeDynamic_klass);
1988 initialize_wk_klasses_until(indy_group_start, scan, CHECK); 1988 initialize_wk_klasses_until(indy_group_start, scan, CHECK);
1989 if (EnableInvokeDynamic) { 1989 if (EnableInvokeDynamic) {
1990 initialize_wk_klasses_through(indy_group_end, scan, CHECK); 1990 initialize_wk_klasses_through(indy_group_end, scan, CHECK);
1991 } 1991 }
1992 if (_well_known_klasses[indy_group_start] == NULL) { 1992 if (_well_known_klasses[indy_group_start] == NULL) {
2338 unsigned int hash = invoke_method_table()->compute_hash(signature); 2338 unsigned int hash = invoke_method_table()->compute_hash(signature);
2339 int index = invoke_method_table()->hash_to_index(hash); 2339 int index = invoke_method_table()->hash_to_index(hash);
2340 SymbolPropertyEntry* spe = invoke_method_table()->find_entry(index, hash, signature); 2340 SymbolPropertyEntry* spe = invoke_method_table()->find_entry(index, hash, signature);
2341 if (spe == NULL || spe->property_oop() == NULL) { 2341 if (spe == NULL || spe->property_oop() == NULL) {
2342 // Must create lots of stuff here, but outside of the SystemDictionary lock. 2342 // Must create lots of stuff here, but outside of the SystemDictionary lock.
2343 if (THREAD->is_Compiler_thread())
2344 return NULL; // do not attempt from within compiler
2343 Handle mt = compute_method_handle_type(signature(), 2345 Handle mt = compute_method_handle_type(signature(),
2344 class_loader, protection_domain, 2346 class_loader, protection_domain,
2345 CHECK_NULL); 2347 CHECK_NULL);
2346 KlassHandle mh_klass = SystemDictionaryHandles::MethodHandle_klass(); 2348 KlassHandle mh_klass = SystemDictionaryHandles::MethodHandle_klass();
2347 methodHandle m = methodOopDesc::make_invoke_method(mh_klass, signature, 2349 methodHandle m = methodOopDesc::make_invoke_method(mh_klass, signature,