i trying configure compileroptions of google closure compiler setting corresponding fields. however, when call method setremovedeadcode() activate dead code removal in simple mode, warning "unreachable code" reported , dead code not removed. why that?
the code following:
if (false) console.log(x); //dead code should removed what activate setremovedeadcode() @ end of method createoptions(), deactivate other options. doing same thing on other options setcoalescevariablenames() works fine. insights appreciated.
the removedeadcode option triggers pass looks @ side-effects , control-flow-graph. can see looking @ unit tests:
it doesn't constant values. there option however, "fold constants" (via setfoldconstants) remove if constant condition.
Comments
Post a Comment