comparison src/share/vm/classfile/systemDictionary.cpp @ 15463:a20be10ad437

made Graal work with the HotSpot compiler queue and compiler threads, enabled by -XX:-UseGraalCompilationQueue
author Doug Simon <doug.simon@oracle.com>
date Fri, 02 May 2014 00:36:27 +0200
parents 4ca6dc0799b6
children b7a1ece4f07b
comparison
equal deleted inserted replaced
15462:05d3f069cff2 15463:a20be10ad437
214 214
215 215
216 // Forwards to resolve_instance_class_or_null 216 // Forwards to resolve_instance_class_or_null
217 217
218 Klass* SystemDictionary::resolve_or_null(Symbol* class_name, Handle class_loader, Handle protection_domain, TRAPS) { 218 Klass* SystemDictionary::resolve_or_null(Symbol* class_name, Handle class_loader, Handle protection_domain, TRAPS) {
219 assert(!THREAD->is_Compiler_thread(), 219 assert(THREAD->can_call_java(),
220 err_msg("can not load classes with compiler thread: class=%s, classloader=%s", 220 err_msg("can not load classes with compiler thread: class=%s, classloader=%s",
221 class_name->as_C_string(), 221 class_name->as_C_string(),
222 class_loader.is_null() ? "null" : class_loader->klass()->name()->as_C_string())); 222 class_loader.is_null() ? "null" : class_loader->klass()->name()->as_C_string()));
223 if (FieldType::is_array(class_name)) { 223 if (FieldType::is_array(class_name)) {
224 return resolve_array_class_or_null(class_name, class_loader, protection_domain, CHECK_NULL); 224 return resolve_array_class_or_null(class_name, class_loader, protection_domain, CHECK_NULL);
2345 Handle *appendix_result, 2345 Handle *appendix_result,
2346 Handle *method_type_result, 2346 Handle *method_type_result,
2347 TRAPS) { 2347 TRAPS) {
2348 methodHandle empty; 2348 methodHandle empty;
2349 assert(EnableInvokeDynamic, ""); 2349 assert(EnableInvokeDynamic, "");
2350 assert(!THREAD->is_Compiler_thread(), ""); 2350 assert(THREAD->can_call_java() ,"");
2351 Handle method_type = 2351 Handle method_type =
2352 SystemDictionary::find_method_handle_type(signature, accessing_klass, CHECK_(empty)); 2352 SystemDictionary::find_method_handle_type(signature, accessing_klass, CHECK_(empty));
2353 if (false) { // FIXME: Decide if the Java upcall should resolve signatures. 2353 if (false) { // FIXME: Decide if the Java upcall should resolve signatures.
2354 method_type = java_lang_String::create_from_symbol(signature, CHECK_(empty)); 2354 method_type = java_lang_String::create_from_symbol(signature, CHECK_(empty));
2355 } 2355 }
2398 int index = invoke_method_table()->hash_to_index(hash); 2398 int index = invoke_method_table()->hash_to_index(hash);
2399 SymbolPropertyEntry* spe = invoke_method_table()->find_entry(index, hash, signature, null_iid); 2399 SymbolPropertyEntry* spe = invoke_method_table()->find_entry(index, hash, signature, null_iid);
2400 if (spe != NULL && spe->method_type() != NULL) { 2400 if (spe != NULL && spe->method_type() != NULL) {
2401 assert(java_lang_invoke_MethodType::is_instance(spe->method_type()), ""); 2401 assert(java_lang_invoke_MethodType::is_instance(spe->method_type()), "");
2402 return Handle(THREAD, spe->method_type()); 2402 return Handle(THREAD, spe->method_type());
2403 } else if (THREAD->is_Compiler_thread()) { 2403 } else if (!THREAD->can_call_java()) {
2404 warning("SystemDictionary::find_method_handle_type called from compiler thread"); // FIXME 2404 warning("SystemDictionary::find_method_handle_type called from compiler thread"); // FIXME
2405 return Handle(); // do not attempt from within compiler, unless it was cached 2405 return Handle(); // do not attempt from within compiler, unless it was cached
2406 } 2406 }
2407 2407
2408 Handle class_loader, protection_domain; 2408 Handle class_loader, protection_domain;