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

[lworld] C1: Canonicalize Class.getClass() intrinsic for inline type instance

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: repo-valhalla
    • Fix Version/s: repo-valhalla
    • Component/s: hotspot
    • Labels:

      Description

      It seem it's possible to canonicalize Class.getClass() intrinsic method when the receiver is type of InstanceConstant:

      e.g. case#1

        B b = B.default;
        Class s = b.getClass(); // canonicalize to constant

      case#2
         public static B foo(){
              return B.default;
          }

          public static boolean test1() {
              B b = foo();
              Class s = b.getClass();
              return true;
          }

        Attachments

          Activity

            People

            Assignee:
            yyang Yi Yang
            Reporter:
            yyang Yi Yang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: