mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8310849: Pattern matching for instanceof and arrayType cleanup in j.l.invoke and j.l.reflect
Reviewed-by: mchung, darcy
This commit is contained in:
parent
7ce967a10c
commit
2bd4136bdb
34 changed files with 211 additions and 292 deletions
|
@ -4254,14 +4254,14 @@ return mh1;
|
|||
}
|
||||
MemberName resolved = resolveOrFail(refKind, member);
|
||||
mh = getDirectMethodForConstant(refKind, defc, resolved);
|
||||
if (mh instanceof DirectMethodHandle
|
||||
if (mh instanceof DirectMethodHandle dmh
|
||||
&& canBeCached(refKind, defc, resolved)) {
|
||||
MemberName key = mh.internalMemberName();
|
||||
if (key != null) {
|
||||
key = key.asNormalOriginal();
|
||||
}
|
||||
if (member.equals(key)) { // better safe than sorry
|
||||
LOOKASIDE_TABLE.put(key, (DirectMethodHandle) mh);
|
||||
LOOKASIDE_TABLE.put(key, dmh);
|
||||
}
|
||||
}
|
||||
return mh;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue