RFR: 8319117: GrowableArray: Allow for custom initializer instead of copy constructor [v7]

Kim Barrett kbarrett at openjdk.org
Tue Oct 31 14:40:42 UTC 2023


On Tue, 31 Oct 2023 14:26:40 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Initialize member
>
> src/hotspot/share/utilities/growableArray.hpp line 411:
> 
>> 409:       if (i >= this->_capacity) grow(i);
>> 410:       for (int j = this->_len; j <= i; j++)
>> 411:         new (&this->_data[j]) E(args...);
> 
> Use global placement new, e.g.  `::new`.  Also below, in `at_put_grow`

Style: Missing braces around the for-loop body.  Also below in `at_put_grow`.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16409#discussion_r1377679955


More information about the hotspot-dev mailing list