Expression optReturnValue = returnValue != null
? (Expression) optimize(returnValue, false)
: null;
if (optReturnValue != null && returnValue != null // 2nd implied by 1st
&& "undefined".equals(returnValue.typeOf())
&& optReturnValue.simplifyForSideEffect() == null) {
return new ReturnStmt(rs.getFilePosition(), null);
} else if (optReturnValue != returnValue) {
return new ReturnStmt(rs.getFilePosition(), optReturnValue);
}
return rs;