Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
8281168: Micro-optimize VarForm.getMemberName for interpreter
Backport-of: fc77217814eb1a346d7380299abdc2b01a69b4de
  • Loading branch information
shipilev committed Mar 16, 2022
1 parent 6b5706a commit c66544f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/java.base/share/classes/java/lang/invoke/VarForm.java
Expand Up @@ -109,9 +109,14 @@ final MethodType getMethodType(int type) {

@ForceInline
final MemberName getMemberName(int mode) {
MemberName mn = getMemberNameOrNull(mode);
// Can be simplified by calling getMemberNameOrNull, but written in this
// form to improve interpreter/coldpath performance.
MemberName mn = memberName_table[mode];
if (mn == null) {
throw new UnsupportedOperationException();
mn = resolveMemberName(mode);
if (mn == null) {
throw new UnsupportedOperationException();
}
}
return mn;
}
Expand Down

1 comment on commit c66544f

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.