Review request for JDK-8151700: Add support for ES6 for-of

Attila Szegedi szegedia at gmail.com
Mon Mar 21 15:00:43 UTC 2016


It’s almost as if ForNode.isForInOrOf() should be a method :-)

The methods of the Iterator in ScriptRuntime.toES6Iterator should have a pass-through catch block for Error too, e.g. instead of "catch(final RuntimeException r)” use “catch(final RuntimeException|Error r)”

Other than this, +1.

Attila.

> On Mar 21, 2016, at 10:34 AM, Hannes Wallnoefer <hannes.wallnoefer at oracle.com> wrote:
> 
> Please review JDK-8151700: Add support for ES6 for-of:
> 
> http://cr.openjdk.java.net/~hannesw/8151700/webrev/
> 
> This enables ES6 for-of loops. The ES6 iterator is wrapped in a java.util.Iterator so it uses the exact same codegen infrastructure as for-in.
> 
> Hannes



More information about the nashorn-dev mailing list