Discussion:
RFR: 8193508: Expressions in split literals must never be optimistic
Hannes Wallnöfer
2017-12-14 17:38:32 UTC
Permalink
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
Jim Laskey (Oracle)
2017-12-20 16:13:08 UTC
Permalink
+1
Post by Hannes Wallnöfer
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.
- 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
Thanks,
Hannes
Sundararajan Athijegannathan
2017-12-20 16:39:13 UTC
Permalink
+1

-Sundar
Post by Hannes Wallnöfer
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.
- 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
Thanks,
Hannes
Loading...