Thanks for the explanation.  Just one more thing I'm not clear about...


http://gwt-code-reviews.appspot.com/1454806/diff/1/dev/core/src/com/google/gwt/dev/js/JsDuplicateFunctionRemover.java
File dev/core/src/com/google/gwt/dev/js/JsDuplicateFunctionRemover.java
(right):

http://gwt-code-reviews.appspot.com/1454806/diff/1/dev/core/src/com/google/gwt/dev/js/JsDuplicateFunctionRemover.java#newcode135
dev/core/src/com/google/gwt/dev/js/JsDuplicateFunctionRemover.java:135:
private Map<JsFunction, JsFunction> dupMethodMap;
final

http://gwt-code-reviews.appspot.com/1454806/diff/1/dev/core/src/com/google/gwt/dev/js/JsDuplicateFunctionRemover.java#newcode136
dev/core/src/com/google/gwt/dev/js/JsDuplicateFunctionRemover.java:136:
private Map<JsFunction, JsName> hoistMap;
final

http://gwt-code-reviews.appspot.com/1454806/diff/1/dev/core/src/com/google/gwt/dev/js/JsDuplicateFunctionRemover.java#newcode193
dev/core/src/com/google/gwt/dev/js/JsDuplicateFunctionRemover.java:193:
JsName newName = program.getScope().declareName("_DUP" + count++);
I would appreciate a brief summary of hoisting in a comment here, or a
pointer to another place in the code where it is described.

http://gwt-code-reviews.appspot.com/1454806/diff/1/dev/core/src/com/google/gwt/dev/js/JsDuplicateFunctionRemover.java#newcode196
dev/core/src/com/google/gwt/dev/js/JsDuplicateFunctionRemover.java:196:
newFunc.setBody(x.getBody());
dumb question here - what are you doing to make this method static?
what if the method body has references to 'this'?

http://gwt-code-reviews.appspot.com/1454806/diff/1/dev/core/src/com/google/gwt/dev/js/JsDuplicateFunctionRemover.java#newcode202
dev/core/src/com/google/gwt/dev/js/JsDuplicateFunctionRemover.java:202:
}
if you wanted to squeeze the last ounce out of this, at this point you
might combine duplicate bodies between the bodies of the hoisted methods
and the static bodies in uniqueBodies.

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

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

Reply via email to