equal
deleted
inserted
replaced
909 // %%% Temporary, until we sort out CheckCastPP vs. CastPP. |
909 // %%% Temporary, until we sort out CheckCastPP vs. CastPP. |
910 // Strip away casting. (It is depth-limited.) |
910 // Strip away casting. (It is depth-limited.) |
911 Node* Node::uncast() const { |
911 Node* Node::uncast() const { |
912 // Should be inline: |
912 // Should be inline: |
913 //return is_ConstraintCast() ? uncast_helper(this) : (Node*) this; |
913 //return is_ConstraintCast() ? uncast_helper(this) : (Node*) this; |
914 if (is_ConstraintCast() || is_CheckCastPP()) |
914 if (is_ConstraintCast()) |
915 return uncast_helper(this); |
915 return uncast_helper(this); |
916 else |
916 else |
917 return (Node*) this; |
917 return (Node*) this; |
918 } |
918 } |
919 |
919 |
962 assert(depth_count++ < K, "infinite loop in Node::uncast_helper"); |
962 assert(depth_count++ < K, "infinite loop in Node::uncast_helper"); |
963 #endif |
963 #endif |
964 if (p == NULL || p->req() != 2) { |
964 if (p == NULL || p->req() != 2) { |
965 break; |
965 break; |
966 } else if (p->is_ConstraintCast()) { |
966 } else if (p->is_ConstraintCast()) { |
967 p = p->in(1); |
|
968 } else if (p->is_CheckCastPP()) { |
|
969 p = p->in(1); |
967 p = p->in(1); |
970 } else { |
968 } else { |
971 break; |
969 break; |
972 } |
970 } |
973 } |
971 } |