review for 7086585: make Java field injection more flexible

Tom Rodriguez tom.rodriguez at oracle.com
Fri Sep 9 11:58:01 PDT 2011


On Sep 9, 2011, at 11:43 AM, Vladimir Kozlov wrote:

> Looks good.
> 
> Don't forget update next comment in vmStructs.cpp:
> 
> +   /* instanceKlass FieldOffset enum    */

Fixed.  I turned RawFieldDescriptor into FieldInfo and moved it into oops/fieldInfo.hpp.  I also split out the field streams into oops/fieldStreams.hpp.  I think at a later point the streams in reflectionUtils.hpp could be moved here but that's a bigger change because of their complex semantics.

tom

> 
> Vladimir
> 
> Tom Rodriguez wrote:
>> FieldInfo sounds pretty good to me.  I reworked fieldDescriptor to use the RawFieldDescriptor by reference similarly to the other classes and I think that helps.  I'm going to rename RawFieldDescriptor to FieldInfo and move it to its own file but I've updated the webrev with all the changes we've talked about so far.  Here's the summary.
>> added RawFieldDescriptor::initialize
>> use an array to produce the FieldAllocationType
>> renamed RawFieldStream to FieldStreamBase and updated the comment for it.
>> eliminated the extra SystemDictionary aliases and simply fixed the few places that need to change their names.
>> tom
>> On Sep 9, 2011, at 11:15 AM, Vladimir Kozlov wrote:
>>> OK. FieldInfo, FieldDesc, FieldLayoutDesc?
>>> 
>>> Vladimir
>>> 
>>> Tom Rodriguez wrote:
>>>> On Sep 9, 2011, at 10:21 AM, Vladimir Kozlov wrote:
>>>>> Can we just have one class FieldDescriptor. Methods and fields are almost the same.
>>>> They serve different functions.  RawFieldDescriptor hides and describes the layout of the fields array itself.  fieldDescriptor serves as a self contained object for talking about a field.  Think of it as a field handle.  So they have to be separate types but they could be more closely related.  Much of fieldDescriptor could be replaced by subclassing RawFieldDescriptor.
>>>> tom
>>>>> Vladimir
>>>>> 
>>>>> Tom Rodriguez wrote:
>>>>>> I had a side conversion with Coleen about this and she suggested moving RawFieldDescriptor into it's own file, which I think is a good idea.  She also commented on the confusion between RawFieldDescriptor and fieldDescriptor because of the name similarity.  I had looked at making fieldDescriptor a subclass of RawField at one point and I think I might be able to make that work.  I also think the RawFieldDescriptor name is bad.  How about FieldLayout?  Any opinions?  I had also considered fixing the capitalization of fieldDescriptor.
>>>>>> tom
>>>>>> On Sep 8, 2011, at 3:47 PM, John Rose wrote:
>>>>>>> I've reviewed it.  It's excellent.  Extra thanks for getting rid of instanceKlass::next_offset.  -- John
>>>>>>> 
>>>>>>> On Sep 8, 2011, at 1:38 PM, Tom Rodriguez wrote:
>>>>>>> 
>>>>>>>> http://cr.openjdk.java.net/~never/7086585
>>>>>>>> 1577 lines changed: 621 ins; 612 del; 344 mod; 65541 unchg
>>>>>>>> 
>>>>>>>> 7086585: make Java field injection more flexible
>>>>>>>> Reviewed-by:



More information about the hotspot-compiler-dev mailing list