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

5.4.3.5: Avoid unnecessary resolution steps for CONSTANT_MethodType

    Details

    • Subcomponent:
      vm

      Description

      Resolution of a CONSTANT_MethodType occurs by resolving each mentioned class. This, in turn, requires loading each class and testing that it is accessible to the caller.

      Compared to the process for resolving a field or method reference (5.4.3.2, 5.4.3.3), this carries additional overhead and can prompt unwanted errors. Method descriptors need not name accessible classes -- in fact, they need not name classes that exist at all (as long as the verification rules are still satisfied).

      It might be better to avoid checking the classes named by a MethodType for accessibility; further, if the MethodType API can be enhanced to avoid requiring Class objects (JDK-8130087), it would be possible to construct a MethodType with the referenced descriptor directly, rather than resolving the named classes first.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jrose John Rose
                Reporter:
                dlsmith Dan Smith
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: