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

CheckCastPPNode::Value() has outdated logic for constants

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • None
    • hotspot
    • None
    • b64

         } else if( in_ptr == TypePtr::Constant ) {
              // Casting a constant oop to an interface? // (i.e., a String to a Comparable?)
              // Then return the interface.
              const TypeOopPtr *jptr = my_type->isa_oopptr();
              assert( jptr, "" );
              result = (jptr->klass()->is_interface() || !in_type->higher_equal(_type))
              ? my_type->cast_to_ptr_type( TypePtr::NotNull )
              : in_type;

        John's comment: "I don't think it helps. This seems like very old code from when interface types were causing faults in type.cpp impl. That logic might be deletable now. As far as I know, interface types are useless noise in C2."

              roland Roland Westrelin
              roland Roland Westrelin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: