Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mcimadamore committed Oct 1, 2024
1 parent 4fee4d2 commit 964a273
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,13 @@ private MethodHandle asTypeCached(MethodType newType) {
return null;
}

/*
* We disable inlining here to prevent complex code in the slow path
* of MethodHandle::asType from being inlined into that method.
* Excessive inlining into MethodHandle::asType can cause that method
* to become too big, which will then cause performance issues during
* var handle and method handle calls.
*/
@DontInline
private MethodHandle setAsTypeCache(MethodType newType) {
MethodHandle at = asTypeUncached(newType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ public interface T { }
}
}

@CompilerControl(CompilerControl.Mode.DONT_INLINE)
void compileAsType() {
for (Class<?> type : types) {
MethodHandle handle = MethodHandles.zero(Object.class);
Expand Down

0 comments on commit 964a273

Please sign in to comment.