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

Replace Verifier::load_class with a simple lookup of super classes

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Won't Fix
    • Affects Version/s: 12
    • Fix Version/s: None
    • Component/s: hotspot

      Description

      See http://hg.openjdk.java.net/jdk/jdk/file/12997ebbc0d8/src/hotspot/share/classfile/verifier.cpp#l2007

      Verifier::load_class(name) is called only when name is known to be the name of a super class of the current class. At this point, the super class should have already been loaded. Also, the loader of the current class should have already recorded the super class as a dependency.

      Therefore, load_class does a lot of work (such as resolving the super class by name) that's not necessary. Also, load_class is declared to potentially throw exceptions. This makes code analysis more complicated.

      The proposal is to remove load_class and just use the "super" class as found by ClassVerifier::name_in_supers.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: