Go patch committed: Fix order of evaluation of boolean expressions

2018-07-20 Thread Ian Lance Taylor
This patch by Cherry Zhang changes the Go frontend to run the order_evaluations before the remove_shortcuts pass. In remove_shortcuts, the shortcut expressions (&&, ||) are rewritten to if statements, which are lifted out before the statement containing the shortcut expression. If the containing

Go patch committed: Fix order of evaluation

2012-04-24 Thread Ian Lance Taylor
This patch to the Go frontend fixes the order of evaluation for a statement like m[0] = len(m) when m is a map. I added a test case for this to the master testsuite. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline and 4.7 branch. Ian diff -r 5b5853844f00 go

Go patch committed: Fix order of evaluation of struct literals

2012-03-29 Thread Ian Lance Taylor
This patch to the Go compiler fixes the order of evaluation of struct composite literals. Previously the compiler assumed that all fields in the struct were set in order. However, the composite literal might be written differently. If the composite literal had function calls, Go specifies that t