Input source: https://github.com/geogebra/geogebra/blob/3618a4ad1d341d8d155c866e320a223ed2687249/source/shared/common/src/main/java/org/geogebra/common/main/settings/AlgebraStyle.java#L102-L111
Apparently, app.isDesktop() compiles to false, and app.isHTML5Applet() compiles to true. This results in the entire method compiling out as
function Jjj(a) {
switch (a.A) {
case 0:
return !1;
case 5:
default:
case 4:
return !0;
}
}
I'm not presently aware of which pass is removing the duplicate return false statements, or why the cases are reordered, but if we removed the case statements that fall through with the default, the existing DCE "only two branches in a switch" optimization would be capable of rewriting to
function Jjj(n) {
return n.A != 0;
}
Input source: https://github.com/geogebra/geogebra/blob/3618a4ad1d341d8d155c866e320a223ed2687249/source/shared/common/src/main/java/org/geogebra/common/main/settings/AlgebraStyle.java#L102-L111
Apparently,
app.isDesktop()compiles tofalse, andapp.isHTML5Applet()compiles to true. This results in the entire method compiling out asI'm not presently aware of which pass is removing the duplicate
return falsestatements, or why the cases are reordered, but if we removed the case statements that fall through with the default, the existing DCE "only two branches in a switch" optimization would be capable of rewriting to