This addresses the first half of issue #610, the Obfuscation optimization part.  This work is based on the idea in alex.tkachman's patch, which is to give params and locals the shortest obfuscated names possible.  My implementation follows design discussions with mmendez & tobyr.

Out with the old:
-Every JsNameRef had a JsName
-Obfuscation occurred during the actual printing of the tree
-Catch blocks did not have their own scope
-The "object" scope (contains qualified name references-- ie instance fields/methods) lived under the global, top level "root" scope (contains global functions and variables)

In with the new:
-JsNameRefs can be created in an unresolved state; they contain only simply String idents and have no associated JsName
-JsSymbolResolver resolves all JsNameRefs; if necessary it creates unobfuscatable names in the root scope
-Obfuscation occurs as its own pass, distinct from printing
-Catch blocks have their own scope specifically to contain the catch arg
-"object" scope is now a sibling of the "top" scope; both of which are contained in a mythical "root" scope, which contains only unobfuscatable names

Suggested by: alex.tkachman
Review by: mmendez


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