Certain lambda expressions are constant, since they don't capture values, and thus the associated invokedynamic instruction performing the linking returns a constant call site. Instead an ldc could be used that refers to a constant dynamic BSM that performs the linking returning a method handle to be invoked (which would be the target of the constant call site if indy was used).
Using an ldc will have less "ceremony" than using an invokedynamic and may improve linkage time, an assumption of which should be validated with performance measurements.
Using an ldc will have less "ceremony" than using an invokedynamic and may improve linkage time, an assumption of which should be validated with performance measurements.
- relates to
-
JDK-8198892 port DynamicFieldSymbol and related bits from amber to mainstream JDK
-
- Closed
-