changeset 1837: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 fff777a71346
children 3b2dea75431e
files src/share/vm/prims/methodHandles.cpp
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/prims/methodHandles.cpp	Sat Oct 30 11:45:49 2010 -0700
+++ b/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