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

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • repo-valhalla
    • repo-valhalla
    • hotspot

      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;
          }

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

              Created:
              Updated: