RFR: 8193508: Expressions in split literals must never be optimistic

Sundararajan Athijegannathan sundararajan.athijegannathan at oracle.com
Wed Dec 20 16:39:13 UTC 2017


+1

-Sundar

On 14/12/17, 11:08 PM, Hannes Wallnöfer wrote:
> Please review:
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8193508
> Webrev: http://cr.openjdk.java.net/~hannesw/8193508/webrev.00/
>
> The actual fix is quite simple: stop visiting when we encounter a split object or array literal in OptimisticTypesCalculator.
>
> There are a few non-essential changes:
>   - rename methods and fields in CodeGeneratorLexicalContext from *SplitNode to *SplitLiteral as the former is misleading (no actual SplitNodes around)
>   - make sure we don’t have optimistic operations unless we generate optimistic code to avoid the situation that enabled this bug
>   - add logging for split array and object nodes in Splitter
>   - add some @Ignore annotations to make nodes behave in IR printer
>
> Thanks,
> Hannes


More information about the nashorn-dev mailing list