Reviewers: Lex, scottb,

Description:
Scott's new ctor patch violates some assumptions of the old duplicate
remover. This new one uses a more general purpose mechanism for avoiding
removal where it's not warranted, the algorithm, as Scott invented it:

Any JsNameRef JsName that is *not* the immediate LHS of a JsInvocation
is blacklisted, and therefore, cannot be replaced nor replace another
ref. For example, defineSeed(ctor1, ctor2) would stop ctor1 or ctor2
from being considered, and so would ctor1.prototype = ... .

It looks like JsNameOf nodes can refer to functions as well, so these
are blacklisted too.

Also added: unit tests.


Please review this at http://gwt-code-reviews.appspot.com/169801

Affected files:
  dev/core/src/com/google/gwt/dev/js/JsDuplicateFunctionRemover.java
  dev/core/test/com/google/gwt/dev/js/JsDuplicateFunctionRemoverTest.java


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to