-
Enhancement
-
Resolution: Fixed
-
P4
-
25
-
master
Currently, there are two basic method handles - zero and identity. A frequently-used method handle, `MethodHandles::constant`, is derived from a BMH binding a value to identity, which need to go through LambdaFormEditor to spin LF classes, and LFE classes are currently not cached. This is one of the contributor for overheads in Perfstartup-LambdaNoop.
I propose to change `constant` to be a basic handle, with the lambda form of returning the BMH value; the zero handle can be seen as `constant` bound to zero, or identity for void. This means that we can reuse a pregenerated LF instead of goign through an editor. This can also simplify our implementation by removing the primitive zero handle/form.
I propose to change `constant` to be a basic handle, with the lambda form of returning the BMH value; the zero handle can be seen as `constant` bound to zero, or identity for void. This means that we can reuse a pregenerated LF instead of goign through an editor. This can also simplify our implementation by removing the primitive zero handle/form.
- relates to
-
JDK-8350617 Improve MethodHandles.tableSwitch and remove intrinsicData
-
- In Progress
-
- links to
-
Commit(master) openjdk/jdk/8ed6c1d7
-
Review(master) openjdk/jdk/23706