The following code:
function f(a) { a.a = 5; return a; }
f(function() {});
f(function() {});
f(function() {});
f(function() {});
f(function() {});
f(function() {});
f(function() {});
f(function() {});
f(function() {});
f(function() {});
f(function() {});
f(function() {});
f(function() {});
f(function() {});
f(function() {});
f(function() {});
f(function() {});
f(function() {});
f(function() {});
f(function() {});
f(function() {});
f(function() {});
f(function() {});
f(function() {});
f(function() {});
is optimized by Closure compiler to this:
function a(){return function(){}}function b(c){c.a=5}b(a());b(a());b(a());b(a());b(a());b(a());b(a());b(a());b(a());b(a());b(a());b(a());b(a());b(a());b(a());b(a());b(a());b(a());b(a());b(a());b(a());b(a());b(a());b(a());b(a());
(It leaves the dead code.)
However, if I remove the last line (repeat the calling only 24x), it removes the dead code. The result is empty.
How can I force the Closure compiler to remove all the dead code also in larger projects?