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.wallnoe...@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

Reply via email to