RFR: 8168140: TypedArrays should implement ES6 iterator protocol
Sundararajan Athijegannathan
sundararajan.athijegannathan at oracle.com
Thu Oct 20 16:09:17 UTC 2016
+1
-Sundar
On 10/20/2016 9:36 PM, Hannes Wallnöfer wrote:
> Thanks, Sundar. I uploaded a new webrev with static utility methods for all array iterators:
>
> http://cr.openjdk.java.net/~hannesw/8168140/webrev.01/
>
> Also, I removed the „values" methods from typed arrays. We don’t yet support other TypedArray methods specified in ES6, and the purpose of this patch is to just support for-of loops for which only the @@iterator method is needed. I also updated the Jira description to reflect this.
>
> Hannes
>
>
>> Am 20.10.2016 um 05:50 schrieb Sundararajan Athijegannathan <sundararajan.athijegannathan at oracle.com>:
>>
>> Could this:
>>
>> + return new ArrayIterator(Global.toObject(self),
>> AbstractIterator.IterationKind.VALUE, Global.instance());
>>
>>
>> be in static utility method somewhere and be called from everywhere?
>>
>> Thanks,
>> -Sundar
>>
>> On 10/19/2016 6:22 PM, Hannes Wallnöfer wrote:
>>> Please review:
>>>
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8168140
>>> Webrev: http://cr.openjdk.java.net/~hannesw/8168140/webrev.00/
>>>
>>> I tried to tweak nasgen to allow me to define the new prototype functions just in the common ArrayBufferView base class, but this turned out to be very complicated so I kept it simple and redundant.
>>>
>>> Thanks,
>>> Hannes
More information about the nashorn-dev
mailing list