8257189: Handle concurrent updates of MH.form better

Reviewed-by: redestad, psandoz
This commit is contained in:
Vladimir Ivanov 2020-12-02 17:35:41 +00:00
parent 670426646d
commit 692b273ec5
5 changed files with 69 additions and 53 deletions

View file

@ -501,6 +501,9 @@ class LambdaForm {
/** Customize LambdaForm for a particular MethodHandle */
LambdaForm customize(MethodHandle mh) {
if (customized == mh) {
return this;
}
LambdaForm customForm = new LambdaForm(arity, names, result, forceInline, mh, kind);
if (COMPILE_THRESHOLD >= 0 && isCompiled) {
// If shared LambdaForm has been compiled, compile customized version as well.