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

Generate code in SwitchBootstraps.generateTypeSwitch that require fewer adaptations

XMLWordPrintable

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

      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.

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

              Created:
              Updated:
              Resolved: