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

C2: TypeAryPtr::cast_to_autobox_cache does not use ptr_type

XMLWordPrintable

    • b16

      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.

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

              Created:
              Updated:
              Resolved: