Thanks, Ray! A couple of things look like they should be changed, as indicated in the line-by-lines.
Also, it should have a test. CompilerTest would be a decent place to put it. http://gwt-code-reviews.appspot.com/102811/diff/1/2 File dev/core/src/com/google/gwt/dev/jjs/impl/PostOptimizationCompoundAssignmentNormalizer.java (right): http://gwt-code-reviews.appspot.com/102811/diff/1/2#newcode73 Line 73: if (x.getLhs().getType() != x.getRhs().getType()) { We don't need to expand that many of them, do we? I believe we are only in trouble if the lhs is integral and the rhs is floating point. http://gwt-code-reviews.appspot.com/102811/diff/1/2#newcode113 Line 113: private JType widenType(JType lhsType, JType rhsType) { This isn't the Java spec. Here is the rule from the JLS: If either operand is of type double, the other is converted to double. Otherwise, if either operand is of type float, the other is converted to float. Otherwise, if either operand is of type long, the other is converted to long. Otherwise, both operands are converted to type int. The result of the operation is then the same as that of the converted arguments. http://gwt-code-reviews.appspot.com/102811 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
