8310913: Move ReferencedKeyMap to jdk.internal so it may be shared

Reviewed-by: naoto, rriggs, mchung, liach
This commit is contained in:
Jim Laskey 2023-07-31 19:11:14 +00:00
parent 86783b9851
commit 6af0af5934
11 changed files with 537 additions and 275 deletions

View file

@ -35,6 +35,7 @@ import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
import jdk.internal.misc.Unsafe;
import jdk.internal.util.ReferencedKeyMap;
import static java.lang.invoke.MethodType.methodType;
@ -366,7 +367,7 @@ final class Carriers {
* Cache mapping {@link MethodType} to previously defined {@link CarrierElements}.
*/
private static final Map<MethodType, CarrierElements>
methodTypeCache = ReferencedKeyMap.create(ConcurrentHashMap::new);
methodTypeCache = ReferencedKeyMap.create(false, ConcurrentHashMap::new);
/**
* Permute a raw constructor and component accessor {@link MethodHandle MethodHandles} to