Enhancement to JsDuplicateFunctionRemover to remove duplicate virtual methods as well. That is, given

_.method1 = function(a) { body }
_.method2 = function(b) { body }

Hoist the duplicate virtual methods and replace with a named global function.

function c(a) { body }
_.method1 = c;
_.method2 = c;

Produces a 1%-3% improvement in code size when stack stripping is enabled.

Review at http://gwt-code-reviews.appspot.com/1454806

Review by: skybrian@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11038 8db76d5a-ed1c-0410-87a9-c151d255dfc7
3 files changed