JDK-8147527: Wrong code generated for postfix unary operators
jan.lahoda at oracle.com
Fri Dec 2 11:22:23 UTC 2016
I've added these comments:
//Need to use the "lhs" at two places, once on the future left hand side
//and once in the future binary operator. But further processing may change
//the components of the tree in place (see visitSelect for e.g.
//so cloning the tree to avoid interference between the uses:
//"tmp1" and "tmp2" may be the same instance
//(for e.g. <Class>.super.<ident>). But further processing may
//change the components of the tree in place (see visitSelect),
//so cloning the tree to avoid interference between the two uses:
How does this look?
On 29.11.2016 22:07, B. Blaser wrote:
> 2016-11-29 16:28 GMT+01:00 Maurizio Cimadamore <maurizio.cimadamore at oracle.com>:
>> Looks good to me. Use of shallow clone looks a tad odd - but I understand
>> why it's the way it is - maybe worth adding a comment?
> I agree that a short comment might be helpful, something like:
> // Shallow clone shall fit JDK-8147527 requirements, according to
> related threads.
>> On 25/11/16 11:38, Jan Lahoda wrote:
>>> As noted here:
>>> javac sometimes generates code incorrectly, as discussed further in the
>>> The proposed fix is to not reuse the AST nodes on multiple places.
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8147527
>>> Webrev: http://cr.openjdk.java.net/~jlahoda/8147527/webrev.00/
>>> Any feedback is welcome.
>>> Thanks to Bernard for his work on this.
More information about the compiler-dev