[9] RFR (XS): 8058828: Wrong ciConstant type for arrays from ConstantPool::_resolved_reference

John Rose john.r.rose at oracle.com
Wed Oct 1 17:34:38 UTC 2014


Reviewed.

On Oct 1, 2014, at 10:15 AM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:

> On 10/1/14 4:07 AM, Vladimir Ivanov wrote:
>> http://cr.openjdk.java.net/~vlivanov/8058828/webrev.00/
>> https://bugs.openjdk.java.net/browse/JDK-8058828
>> 
>> There are 2 unrelated problems for the same scenario.
>> 
>> ciEnv::get_constant_by_index_impl doesn't distinguish T_OBJECT & T_ARRAY cases for constant pool patches in VM anonymous
>> classes.
>> The fix is to adjust the type, if a constant value is an array.
> 
> Should we add check that class is anonymous? Can this be in normal class?

It can't be a normal class at present.  When we get array constants, that will change.

I lean towards keeping the assert as-is, and not adding a new test for kind of class.  But I would be OK either way.

— John

> 
>> ciTypeFlow::StateVector::do_ldc has too strong assertion. Since basic_type = {T_OBJECT|T_ARRAY}, obj->is_array() should
>> be also expected.
> 
> This is good.
> 
> Thanks,
> Vladimir
> 
>> 
>> Testing: failing tests, regression test.
>> 
>> Thanks!
>> 
>> Best regards,
>> Vladimir Ivanov



More information about the hotspot-compiler-dev mailing list