861 const Type *CmpNNode::sub( const Type *t1, const Type *t2 ) const { |
861 const Type *CmpNNode::sub( const Type *t1, const Type *t2 ) const { |
862 const TypePtr *r0 = t1->make_ptr(); // Handy access |
862 const TypePtr *r0 = t1->make_ptr(); // Handy access |
863 const TypePtr *r1 = t2->make_ptr(); |
863 const TypePtr *r1 = t2->make_ptr(); |
864 |
864 |
865 // Undefined inputs makes for an undefined result |
865 // Undefined inputs makes for an undefined result |
866 if( TypePtr::above_centerline(r0->_ptr) || |
866 if ((r0 == NULL) || (r1 == NULL) || |
867 TypePtr::above_centerline(r1->_ptr) ) |
867 TypePtr::above_centerline(r0->_ptr) || |
|
868 TypePtr::above_centerline(r1->_ptr)) { |
868 return Type::TOP; |
869 return Type::TOP; |
869 |
870 } |
870 if (r0 == r1 && r0->singleton()) { |
871 if (r0 == r1 && r0->singleton()) { |
871 // Equal pointer constants (klasses, nulls, etc.) |
872 // Equal pointer constants (klasses, nulls, etc.) |
872 return TypeInt::CC_EQ; |
873 return TypeInt::CC_EQ; |
873 } |
874 } |
874 |
875 |