[9] RFR(S): JDK-8039498: Add iterators to GrowableArray

Tobias Hartmann Tobias.Hartmann at oracle.com
Thu Apr 10 12:08:52 UTC 2014


Rickard noticed that it does not make sense to declare the iterators as 
ResourceObj. They are now declared as StackObj.

The updated webrev can be found at: 
http://cr.openjdk.java.net/~anoll/8039498/webrev.03/ 
<http://cr.openjdk.java.net/%7Eanoll/8039498/webrev.03/>

Thanks,
Tobias

On 04/10/2014 11:34 AM, Tobias Hartmann wrote:
> Vladimir, Vitaly, thanks for the reviews. Please see comments inline.
>
> New webrev: http://cr.openjdk.java.net/~anoll/8039498/webrev.02/
>
> On 04/09/2014 09:53 PM, Vitaly Davidovich wrote:
>>
>> I would add a few asserts:
>>
>> 1) verify that position provided to iterator is within valid range
>> 2) equality operators should verify that both iterators point to same 
>> GA instances
>>
>> These are pedantic given how these iterators will be used, but 
>> wouldn't hurt, IMHO.
>>
>
> I added asserts to the constructor and the equality operators.
>
>> On Apr 9, 2014 2:37 PM, "Vladimir Kozlov" <vladimir.kozlov at oracle.com 
>> <mailto:vladimir.kozlov at oracle.com>> wrote:
>>
>>     Hi Tobias
>>
>>     Changes looks fine to me. I would only move initial
>>     pre-declaration of 2 new templates after GenericGrowableArray
>>     definition and before GrowableArray template which uses them.
>>
>>     Thanks,
>>     Vladimir
>>
>
> Done.
>
> Thanks,
> Tobias
>
>>
>>     On 4/9/14 6:19 AM, Tobias Hartmann wrote:
>>
>>         Hi,
>>
>>         please review the following patch.
>>
>>         *Problem:*
>>         The implementation of "JDK-8015774: Add support for multiple
>>         code heaps"
>>         needs to manage multiple code heaps in the code cache. They
>>         will be
>>         stored in a GrowableArray data structure. Frequent accesses
>>         to the array
>>         using indices make the code more unreadable and error prone
>>         and result
>>         in code duplication.
>>         Bug: https://bugs.openjdk.java.net/browse/JDK-8039498
>>
>>         *Solution:*
>>         To simplify the access to the code heaps, the GrowableArray
>>         is adapted
>>         to support STL-style iterators. Further, custom iterators
>>         allow to only
>>         iterate over elements that satisfy a given predicate. This
>>         helps to
>>         access only specific code heaps.
>>         Webrev: http://cr.openjdk.java.net/~anoll/8039498/webrev.01/
>>         <http://cr.openjdk.java.net/%7Eanoll/8039498/webrev.01/>
>>
>>         *Tests:*
>>         JPRT with segmented code cache implementation (to be reviewed)
>>
>>         Thanks,
>>
>>         Tobias
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20140410/cbda4756/attachment.html>


More information about the hotspot-compiler-dev mailing list