-
Enhancement
-
Resolution: Unresolved
-
P3
-
18
-
None
JEP 416 implementation does not use catchException and asSpreader combinator because of the performance regression. In particular the cold startup regression is significant due to the spinning and loading of the lambda classes.
The current implementation decodes from the stack trace to determine if NPE and CCE are thrown due to illegal argument passed to Method::invoke or thrown by the method body so that IAE or ITE is thrown properly. It also has a specialized logic to avoid using asSpreader if the method has 3 or fewer arguments. It'd be ideal to improve the performance of catchException and asSpreader or the version specified for core reflection use such that the special logics can be removed.
The current implementation decodes from the stack trace to determine if NPE and CCE are thrown due to illegal argument passed to Method::invoke or thrown by the method body so that IAE or ITE is thrown properly. It also has a specialized logic to avoid using asSpreader if the method has 3 or fewer arguments. It'd be ideal to improve the performance of catchException and asSpreader or the version specified for core reflection use such that the special logics can be removed.
- relates to
-
JDK-8277964 ClassCastException with no stack trace is thrown with -Xcomp in method handle invocation
- Resolved
-
JDK-8288041 Lazily compile lambda forms to bytecode
- Open
-
JDK-8271820 Implementation of JEP 416: Reimplement Core Reflection with Method Handle
- Resolved