Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8203886

Invoke LambdaMetafactory::altMetafactory exactly from the BootstrapMethodInvoker

    XMLWordPrintable

    Details

      Backports

        Description

        Similarly to JDK-8198418, we can avoid some early LF creation in various benchmarks by adapting calls to the altMetafactory as exactly as possible in the BootstrapMethodInvoker.

        As a test case, the following program loads and generates 29 fewer classes with a patch to invoke the altMetafactory BSM exactly:

        public class ComparingInt {

          public static void main(String ... args) {
            java.util.Arrays.sort(args, java.util.Comparator.comparingInt(s -> s.hashCode()));
          }
        }

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                redestad Claes Redestad
                Reporter:
                redestad Claes Redestad
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: