# HG changeset patch # User Michael Van De Vanter # Date 1403115964 25200 # Node ID da21746a64bf84628f4a6156b3d51c8a503979a9 # Parent 7109baa7b9eb5801be85c3e6ea3f253d5f22a998# Parent b7a1ece4f07b8b4e8619b9ce67b7b1f6b4757879 Merge diff -r 7109baa7b9eb -r da21746a64bf src/share/vm/classfile/systemDictionary.cpp --- a/src/share/vm/classfile/systemDictionary.cpp Wed Jun 18 11:05:16 2014 -0700 +++ b/src/share/vm/classfile/systemDictionary.cpp Wed Jun 18 11:26:04 2014 -0700 @@ -2286,7 +2286,7 @@ spe = NULL; // Must create lots of stuff here, but outside of the SystemDictionary lock. m = Method::make_method_handle_intrinsic(iid, signature, CHECK_(empty)); - CompileBroker::compile_method(m, InvocationEntryBci, CompLevel_highest_tier, + nmethod* nm = CompileBroker::compile_method(m, InvocationEntryBci, CompLevel_highest_tier, methodHandle(), CompileThreshold, "MH", CHECK_(empty)); // Now grab the lock. We might have to throw away the new method, @@ -2299,9 +2299,12 @@ if (spe->method() == NULL) spe->set_method(m()); } + } else if (spe->method()->code() == NULL) { + nmethod* nm = CompileBroker::compile_method(spe->method(), InvocationEntryBci, CompLevel_highest_tier, + methodHandle(), CompileThreshold, "MH", CHECK_(empty)); } - assert(spe != NULL && spe->method() != NULL, ""); + guarantee(spe != NULL && spe->method() != NULL && spe->method()->code() != NULL, "Could not compile a method handle intrinsic"); return spe->method(); }