Request for reviews (XS): 6875619

Vladimir Kozlov Vladimir.Kozlov at Sun.COM
Fri Aug 28 10:53:51 PDT 2009


And there is no cast to real array type in between:

83 invokestatic 36 <newInstance> <(Ljava/lang/Class;I)Ljava/lang/Object;>
   320 bci: 83   CounterData         count(0)
86 astore #5
88 iconst_0
89 istore #6
91 iload #6
93 aload #5
95 invokestatic 37 <getLength> <(Ljava/lang/Object;)I>
   328 bci: 95   CounterData         count(0)

Vladimir

Vladimir Kozlov wrote:
> It is user method asks for length and we generate inline_native_getLength()
> intrinsic for it which calls load_array_length(array).
> 
> Vladimir
> 
> Tom Rodriguez wrote:
>> Why are we asking for the length of something which either isn't an 
>> array or hasn't properly cast to be an array yet?
>>
>> tom
>>
>> On Aug 27, 2009, at 6:43 PM, Vladimir Kozlov wrote:
>>
>>> http://cr.openjdk.java.net/~kvn/6875619/webrev.00
>>>
>>> Fixed 6875619: CTW fails with /hotspot/src/share/vm/opto/type.hpp
>>>
>>> Problem:
>>> GraphKit::load_array_length() tries to cast type of new allocated
>>> array to TypeAryPtr. It fails since it is reflection allocation
>>> and type is Object.
>>>
>>> Solution:
>>> Cast to TypeOopPtr which is the parameter type of
>>> make_ideal_length() method.
>>>
>>> Reviewed by:
>>>
>>> Fix verified (y/n): y, test
>>>
>>> Other testing:
>>> JPRT
>>>
>>


More information about the hotspot-compiler-dev mailing list