提交 8bb48a1f 编写于 作者: K kevinw

8149367: PolicyQualifierInfo/index_Ctor JCk test fails with IOE: Invalid...

8149367: PolicyQualifierInfo/index_Ctor JCk test fails with IOE: Invalid encoding for PolicyQualifierInfo
Summary: fix incorrect code
Reviewed-by: kvn, coleenp
上级 cf2f0720
/*
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -847,13 +847,25 @@ public:
_obj->int_field_put(offset, (jint)*((jint*)&val));
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));
......@@ -899,13 +911,25 @@ void Deoptimization::reassign_type_array_elements(frame* fr, RegisterMap* reg_ma
obj->int_at_put(index, (jint)*((jint*)&val));
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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册