Mercurial > hg > truffle
comparison src/share/vm/prims/methodHandles.cpp @ 1912:8213b0f5c92d
6981777: implement JSR 292 EG adjustments from summer 2010
Summary: Small bug fix to make "raw" adapters work for JDK changes under 6981777
Reviewed-by: twisti
author | jrose |
---|---|
date | Sat, 30 Oct 2010 12:19:07 -0700 |
parents | 5beba6174298 |
children | f95d63e2154a |
comparison
equal
deleted
inserted
replaced
1911:fff777a71346 | 1912:8213b0f5c92d |
---|---|
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 |