2271 methodHandle m; |
2271 methodHandle m; |
2272 if (spe == NULL || spe->method() == NULL) { |
2272 if (spe == NULL || spe->method() == NULL) { |
2273 spe = NULL; |
2273 spe = NULL; |
2274 // Must create lots of stuff here, but outside of the SystemDictionary lock. |
2274 // Must create lots of stuff here, but outside of the SystemDictionary lock. |
2275 m = Method::make_method_handle_intrinsic(iid, signature, CHECK_(empty)); |
2275 m = Method::make_method_handle_intrinsic(iid, signature, CHECK_(empty)); |
2276 CompileBroker::compile_method(m, InvocationEntryBci, CompLevel_highest_tier, |
2276 if (!Arguments::is_interpreter_only()) { |
2277 methodHandle(), CompileThreshold, "MH", CHECK_(empty)); |
2277 // Generate a compiled form of the MH intrinsic. |
2278 // Check if we need to have compiled code but we don't. |
2278 AdapterHandlerLibrary::create_native_wrapper(m); |
2279 if (!Arguments::is_interpreter_only() && !m->has_compiled_code()) { |
2279 // Check if have the compiled code. |
2280 THROW_MSG_(vmSymbols::java_lang_VirtualMachineError(), |
2280 if (!m->has_compiled_code()) { |
2281 "out of space in CodeCache for method handle intrinsic", empty); |
2281 THROW_MSG_(vmSymbols::java_lang_VirtualMachineError(), |
|
2282 "out of space in CodeCache for method handle intrinsic", empty); |
|
2283 } |
2282 } |
2284 } |
2283 // Now grab the lock. We might have to throw away the new method, |
2285 // Now grab the lock. We might have to throw away the new method, |
2284 // if a racing thread has managed to install one at the same time. |
2286 // if a racing thread has managed to install one at the same time. |
2285 { |
2287 { |
2286 MutexLocker ml(SystemDictionary_lock, THREAD); |
2288 MutexLocker ml(SystemDictionary_lock, THREAD); |