title: closure compiler / uglifyjs - this.function name not shortened?
body: <p>If I run this piece of code through closure compiler or uglifyjs, this.init is not shortened.. Can anyone tell me why that is? </p>
  
  <pre><code>function test() {
      var v = "abc";
      this.init = function() {
           alert('var = ' + v + ' and func = ' + f());
           f2();
      }
      function f() {
          return 'def';
      }
      function f2() {
          v = "ghi";
          alert('blabla');
          alert('filler');
      }
  }
  
  test();
  </code></pre>
  
  <p>uglifyjs turns this into : </p>
  
  <pre><code>function test(){function c(){a="ghi",alert("blabla"),alert("filler")}function b(){return"def"}var a="abc";this.init=function(){alert("var = "+a+" and func = "+b()),c()}}test()
  </code></pre>
  
  <p>Beautified that is: </p>
  
  <pre><code>function test() {
      function c() {
          a = "ghi", alert("blabla"), alert("filler")
      }
      function b() {
          return "def"
      }
      var a = "abc";
      this.init = function () {
          alert("var = " + a + " and func = " + b()), c()
      }
  }
  
  test()
  </code></pre>
  
  <p>So why is this.init() not changed as well to a shorter name? </p>
  
  <p>Additionally, what exactly is the difference between doing: </p>
  
  <pre><code> function init() {..}
  </code></pre>
  
  <p>and</p>
  
  <pre><code> this.init = function() { .. }
  </code></pre>
  
  <p>Thanks,
  Wesley</p>