equal
deleted
inserted
replaced
972 // This trick is pulled by trusted code (see VerifyType.canPassRaw). |
972 // This trick is pulled by trusted code (see VerifyType.canPassRaw). |
973 } |
973 } |
974 assert(src != T_VOID && dst != T_VOID, "should not be here"); |
974 assert(src != T_VOID && dst != T_VOID, "should not be here"); |
975 if (src == dst) return true; |
975 if (src == dst) return true; |
976 if (type2size[src] != type2size[dst]) return false; |
976 if (type2size[src] != type2size[dst]) return false; |
|
977 if (src == T_OBJECT || dst == T_OBJECT) return false; |
|
978 if (raw) return true; // bitwise reinterpretation; caller guarantees safety |
977 // allow reinterpretation casts for integral widening |
979 // allow reinterpretation casts for integral widening |
978 if (is_subword_type(src)) { // subwords can fit in int or other subwords |
980 if (is_subword_type(src)) { // subwords can fit in int or other subwords |
979 if (dst == T_INT) // any subword fits in an int |
981 if (dst == T_INT) // any subword fits in an int |
980 return true; |
982 return true; |
981 if (src == T_BOOLEAN) // boolean fits in any subword |
983 if (src == T_BOOLEAN) // boolean fits in any subword |