RFR (10): JDK-8181191: getUint32 returning Long

Marcus Lagergren marcus at lagergren.net
Sun Jul 23 11:55:13 UTC 2017


This cache thing is my least favourite behavior in the entire JLS. Crazy that it’s actually a mandated part of the language specification.

+1

/M

> On 13 Jun 2017, at 18:28, Hannes Wallnöfer <hannes.wallnoefer at oracle.com> wrote:
> 
> 
>> Am 13.06.2017 um 18:17 schrieb Attila Szegedi <szegedia at gmail.com>:
>> 
>> the test described in the issue was failing because we treated Long objects as JS objects, right?
>> 
> 
> Yes. 127 compared equal to itself because Long instances between -128 and 127 are cached, 128 is just outside that range.
> 
> Thanks for the review!
> Hannes
> 
>> Attila.
>> 
>>> On 13 Jun 2017, at 17:51, Hannes Wallnöfer <hannes.wallnoefer at oracle.com> wrote:
>>> 
>>> Please review: 
>>> 
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8181191
>>> Webrev: http://cr.openjdk.java.net/~hannesw/8181191/webrev/
>>> 
>>> Thanks,
>>> Hannes
>> 
> 



More information about the nashorn-dev mailing list