8149367: PolicyQualifierInfo/index_Ctor JCk test fails with IOE: Invalid encoding for PolicyQualifierInfo
authorkvn
Sat, 20 Feb 2016 14:11:18 -0800
changeset 37484 444a8c40cf95
parent 37483 8447cff6323d
child 37485 9fd1bf883f3c
8149367: PolicyQualifierInfo/index_Ctor JCk test fails with IOE: Invalid encoding for PolicyQualifierInfo Summary: fix incorrect code Reviewed-by: jrose, coleenp, kevinw
hotspot/src/share/vm/runtime/deoptimization.cpp
--- a/hotspot/src/share/vm/runtime/deoptimization.cpp	Tue Feb 09 15:54:16 2016 -0500
+++ b/hotspot/src/share/vm/runtime/deoptimization.cpp	Sat Feb 20 14:11:18 2016 -0800
@@ -896,13 +896,25 @@
       break;
     }
 
-    case T_SHORT: case T_CHAR: // 2 bytes
+    case T_SHORT:
       assert(value->type() == T_INT, "Agreement.");
       val = value->get_int();
       obj->short_at_put(index, (jshort)*((jint*)&val));
       break;
 
-    case T_BOOLEAN: case T_BYTE: // 1 byte
+    case T_CHAR:
+      assert(value->type() == T_INT, "Agreement.");
+      val = value->get_int();
+      obj->char_at_put(index, (jchar)*((jint*)&val));
+      break;
+
+    case T_BYTE:
+      assert(value->type() == T_INT, "Agreement.");
+      val = value->get_int();
+      obj->byte_at_put(index, (jbyte)*((jint*)&val));
+      break;
+
+    case T_BOOLEAN:
       assert(value->type() == T_INT, "Agreement.");
       val = value->get_int();
       obj->bool_at_put(index, (jboolean)*((jint*)&val));
@@ -1017,13 +1029,25 @@
         break;
       }
 
-      case T_SHORT: case T_CHAR: // 2 bytes
+      case T_SHORT:
         assert(value->type() == T_INT, "Agreement.");
         val = value->get_int();
         obj->short_field_put(offset, (jshort)*((jint*)&val));
         break;
 
-      case T_BOOLEAN: case T_BYTE: // 1 byte
+      case T_CHAR:
+        assert(value->type() == T_INT, "Agreement.");
+        val = value->get_int();
+        obj->char_field_put(offset, (jchar)*((jint*)&val));
+        break;
+
+      case T_BYTE:
+        assert(value->type() == T_INT, "Agreement.");
+        val = value->get_int();
+        obj->byte_field_put(offset, (jbyte)*((jint*)&val));
+        break;
+
+      case T_BOOLEAN:
         assert(value->type() == T_INT, "Agreement.");
         val = value->get_int();
         obj->bool_field_put(offset, (jboolean)*((jint*)&val));