CheckCastPPNode::Value() has outdated logic for constants

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 9
    • Affects Version/s: None
    • Component/s: 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."

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

                Created:
                Updated:
                Resolved: