Review request for JDK-8047357

A. Sundararajan sundararajan.athijegannathan at oracle.com
Thu Jun 26 10:54:08 UTC 2014


+1

PS. Test has 2013 copyright.

-Sundar

On Thursday 26 June 2014 03:52 PM, Attila Szegedi wrote:
> Please review JDK-8047357 at <http://cr.openjdk.java.net/~attila/8047357/webrev.00> for <https://bugs.openjdk.java.net/browse/JDK-8047357>
>
> The issue is fixed by the change in LocalVariableTypesCalculator.enterThrowNode() and the fix in the assert in the CodeGenerator.
>
> However, then it uncovers a different bug – one special case of JDK-8048186, which is still not fixed. I have fixed this special case (missing return at the end of a normally terminating function) by moving the synthetic return statement generator from Lower to LocalVariableTypesCalculator as it has precise static reachability analysis.
>
> As part of the changes, I also did some more modifications:
>
> - I noticed IdentNode.setSymbol() was returning Expression instead of IdentNode, and changed it. As a consequence, some casts in the code are no longer necessary.
>
> - isTerminal, hasTerminalFlags, and hasGoto have been removed from Node, as expressions are never terminal. They're moved to Statement, and some other AST nodes that aren't statement but can be terminal implement a new Terminal interface (Block and CaseNode), similar to the design of Optimistic interface. It could be further refined by only implementing Terminal on those Statement subclasses that can, in fact, sometimes return true for isTerminal, but it'll do for now.
>
> Thanks,
>    Attila.



More information about the nashorn-dev mailing list