On Thu, 26 Sep 2024 13:30:07 GMT, David M. Lloyd <d...@openjdk.org> wrote:
> Currently, `ParserVerifier#verifyConstantPool` uses a `switch` to produce a > `Runnable`, which is consumed by a `Consumer<Runnable>` (instantiated within > a loop) which runs the task inside if a `try`/`catch`. We can eliminate a > number of lambdas and method references, plus some allocation pressure, in > this code by simplifying it so that the `switch` is itself run directly > within the `try`/`catch`. This pull request has now been integrated. Changeset: 08c1f44e Author: David M. Lloyd <david.ll...@redhat.com> Committer: Chen Liang <li...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/08c1f44eef56e1b6e6960596f6664fbd973c3d7e Stats: 80 lines in 1 file changed: 38 ins; 10 del; 32 mod 8341028: Do not use lambdas or method refs for verifyConstantPool Reviewed-by: adinn, liach ------------- PR: https://git.openjdk.org/jdk/pull/21209