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

InvokerBytecodeGenerator::lookupPregenerated does not support all cases

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: New
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:

      Description

      http://hg.openjdk.java.net/jdk/jdk/file/8ada048df69d/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java#l704

      It can return null in certain cases:

              if (form.customized != null) {
                  // No pre-generated version for customized LF
                  return null; <<<<<<
              }
              switch (form.kind) {
                  case XXXX: return resolveFrom(xxxx);
                  case YYYY: return resolveFrom(yyyy ....);
              }
              return null; <<<<<<

      As a result, for JDK-8247536, we cannot pre-generate all the needed code for "javac HelloWorld.java". About 8 classes are dynamically generated at runtime -- 1 for the first case and 7 for the second case

      ---------

      Supporting (form.customized != null) will be hard. However, for the second case, maybe we are missing some cases in the switch statement that can be implemeted?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              iklam Ioi Lam
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: