Skip to content

Commit

Permalink
Add @ForceInline to MethodHandle::asType, as per review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mcimadamore committed Oct 2, 2024
1 parent 964a273 commit c4daec5
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

import jdk.internal.loader.ClassLoaders;
import jdk.internal.vm.annotation.DontInline;
import jdk.internal.vm.annotation.ForceInline;
import jdk.internal.vm.annotation.IntrinsicCandidate;

import java.lang.constant.ClassDesc;
Expand Down Expand Up @@ -857,6 +858,7 @@ public Object invokeWithArguments(java.util.List<?> arguments) throws Throwable
* @throws WrongMethodTypeException if the conversion cannot be made
* @see MethodHandles#explicitCastArguments
*/
@ForceInline
public final MethodHandle asType(MethodType newType) {
// Fast path alternative to a heavyweight {@code asType} call.
// Return 'this' if the conversion will be a no-op.
Expand Down

0 comments on commit c4daec5

Please sign in to comment.