6981777: implement JSR 292 EG adjustments from summer 2010
authorjrose
Sat, 30 Oct 2010 12:19:07 -0700
changeset 7113 f05a0ba2802f
parent 7112 6fabbeabb6e9
child 7114 65d21c4c6337
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
hotspot/src/share/vm/prims/methodHandles.cpp
--- a/hotspot/src/share/vm/prims/methodHandles.cpp	Sat Oct 30 11:45:49 2010 -0700
+++ b/hotspot/src/share/vm/prims/methodHandles.cpp	Sat Oct 30 12:19:07 2010 -0700
@@ -974,6 +974,8 @@
   assert(src != T_VOID && dst != T_VOID, "should not be here");
   if (src == dst)  return true;
   if (type2size[src] != type2size[dst])  return false;
+  if (src == T_OBJECT || dst == T_OBJECT)  return false;
+  if (raw)  return true;  // bitwise reinterpretation; caller guarantees safety
   // allow reinterpretation casts for integral widening
   if (is_subword_type(src)) { // subwords can fit in int or other subwords
     if (dst == T_INT)         // any subword fits in an int