Please review JDK-8035312

Marcus Lagergren marcus.lagergren at oracle.com
Wed Nov 12 11:00:01 UTC 2014


Third issue: no it doesn’t . For example for a LengthNotWritableData there can be elements larger then length that can be returned

> On 12 Nov 2014, at 11:41, Hannes Wallnoefer <hannes.wallnoefer at oracle.com> wrote:
> 
> A few minor remarks:
> 
> - Shouldn't ArrayData.increaseLength and .decreaseLength be protected instead of public?
> - Javadoc of ArrayData.length is missing # for link: {@link #setLength} (although it's a private field anyway...)
> - Is the (index >= len) check needed in NativeArray.sort? Does not ArrayData.indexIterator take care of this?
> - Some of the new tests use a mix of spaces/tabs for indentation.
> 
> Otherwise looks good.
> 
> Hannes
> 
> Am 2014-11-11 um 17:37 schrieb Marcus Lagergren:
>> Please review
>> 
>> https://bugs.openjdk.java.net/browse/JDK-8035312 <https://bugs.openjdk.java.net/browse/JDK-8035312>
>> 
>> There were several corner cases related to length in general and setting length in arrays to not writable in particular.
>> None of the existing run times pass all the tests, so this was a very hard area to get right (added 6 new unit tests)
>> 
>> I’ve also gotten rid of the special casey length not writable SwitchPoint in NativeArray - now that I have a filter for LengtNotWritableArray that can’t be cast to a ContinuousArrayData in the fast paths, this handles itself anyway.
>> 
>> webrev at: http://cr.openjdk.java.net/~lagergren/8035312/
>> 
>> /M
>> 
> 



More information about the nashorn-dev mailing list