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

Jim Laskey (Oracle) james.laskey at oracle.com
Wed Dec 20 16:13:08 UTC 2017


+1


> On Dec 14, 2017, at 1:38 PM, Hannes Wallnöfer <hannes.wallnoefer at oracle.com> 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