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

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • repo-valhalla
    • Affects Version/s: repo-valhalla
    • Component/s: 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;
          }

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

              Created:
              Updated: