Skip to content

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 14, 2022
1 parent 5edb982 commit c82e18f
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 c82e18f

@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.