mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8338532: Speed up the ClassFile API MethodTypeDesc#ofDescriptor
Reviewed-by: redestad, liach
This commit is contained in:
parent
918cf11454
commit
3aeb6733f9
11 changed files with 201 additions and 110 deletions
|
@ -25,6 +25,7 @@
|
|||
package java.lang.invoke;
|
||||
|
||||
import sun.invoke.util.Wrapper;
|
||||
import jdk.internal.constant.ConstantUtils;
|
||||
|
||||
import static java.lang.invoke.MethodHandleNatives.mapLookupExceptionToError;
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
@ -112,7 +113,7 @@ public final class ConstantBootstraps {
|
|||
throw new IllegalArgumentException(String.format("not primitive: %s", name));
|
||||
}
|
||||
|
||||
return Wrapper.forPrimitiveType(name.charAt(0)).primitiveType();
|
||||
return ConstantUtils.forPrimitiveType(name, 0).resolveConstantDesc(lookup);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue