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

InvokerBytecodeGenerator::lookupPregenerated does not support all cases

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • core-libs

      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?

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

              Created:
              Updated: