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

C2: TypeAryPtr::cast_to_autobox_cache does not use ptr_type

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 11, 15, 16
    • Fix Version/s: 16
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      b16

      Description

      CLion reports "ptr_type" is unused here:

      const TypeAryPtr* TypeAryPtr::cast_to_autobox_cache(bool cache) const {
        ...
        // The pointers in the autobox arrays are always non-null.
        TypePtr::PTR ptr_type = cache ? TypePtr::NotNull : TypePtr::AnyNull;
        etype = etype->cast_to_ptr_type(TypePtr::NotNull)->is_oopptr();
        ...
      }

      I wonder if cast_to_ptr_type on the next line was supposed to use ptr_type? If not, then ptr_type definition can be just pruned (and this might be just the Enhancement, not bug).

      Assigning to Vladimir, because that code is from JDK-8078629.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rcastanedalo Roberto Castaneda Lozano
              Reporter:
              shade Aleksey Shipilev
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: