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

Generate code in SwitchBootstraps.generateTypeSwitch that require fewer adaptations

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 23
    • None
    • core-libs
    • None
    • b25

    Description

      When bootstrapping switches we currently add a call to Objects.checkIndex by adding a filterArgument to the method handle, then explicitCast to adapt the code to the right type. These operations means a not insignificant number of LF and species classes are needed to be spun up when bootstrapping even a relatively simple runtime-bootstrapped switch.

      By folding the checkIndex code and generating the method with precise arguments from the start we can avoid a few MH transforms and associated class spinning, while retaining parity on throughput metrics.

      Attachments

        Issue Links

          Activity

            People

              redestad Claes Redestad
              redestad Claes Redestad
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: