mishoo/UglifyJS2 — pull request #558 by TalAter (2014-09-28 21:42:54+00:00)
Title: Optimize conditionals where the consequent and alternative are false and true

Optimize conditionals that return/assign true and false values.

Common examples:
````javascript
if (y) {
return true;
} else {
return false;
}
// will become return !!y;

if (y) {
x = true;
} else {
x = false;
}
// will become x=!!y;

if (y) {
x = false;
} else {
x = true;
}
// will become x=!y;

x = y ? false : true;
// will become x=!y;
````

Compressed and evaluated:
````javascript
// Before this change:
return y?true:false;x=y?true:false;x=y?false:true;x=y?false:true;
// or
return y?!0:!1;x=y?!0:!1;x=y?!1:!0;x=y?!1:!0;
// After this change:
return !!y;x=!!y;x=!y;x=!y;
````