http://gwt-code-reviews.appspot.com/159803/diff/1/3
File dev/core/src/com/google/gwt/dev/jjs/ast/JConstructor.java (right):

http://gwt-code-reviews.appspot.com/159803/diff/1/3#newcode64
Line 64: public boolean isEmpty() {
Good call.  Adding a method comment.

http://gwt-code-reviews.appspot.com/159803/diff/1/3#newcode76
Line 76: JStatement stmt = statements.get(0);
I'm adding a comment here:
// Only one statement. Check to see if it's an empty super() or this()
call.

http://gwt-code-reviews.appspot.com/159803/diff/1/3#newcode80
Line 80: if (expr instanceof JMethodCall) {
Actually, this code really needed extra commenting.  What we're actually
looking for here is a super() or this() call, which is not a
JNewInstance.  In fact, I'm updating this test to read:

if (expr instanceof JMethodCall && !(expr instanceof JNewInstance)) {

http://gwt-code-reviews.appspot.com/159803/diff/1/3#newcode84
Line 84: return isEmpty = ((JConstructor) target).isEmpty();
Again, sorry for the confusion.  Since this only applies to this/super
constructor chaining, it will definitely terminate relatively fast.

http://gwt-code-reviews.appspot.com/159803/diff/1/8
File dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java (right):

http://gwt-code-reviews.appspot.com/159803/diff/1/8#newcode993
Line 993: true, false);
Heh, I thought once about making a NullHolder class that had a
Java-declared nullMethod/nullField that were indexed.  Only problem was,
it would end up getting visited by all the visitors and Bad Thing would
happen.  So I gave up at the time.

http://gwt-code-reviews.appspot.com/159803/diff/1/25
File dev/core/src/com/google/gwt/dev/jjs/impl/RemoveEmptySuperCalls.java
(right):

http://gwt-code-reviews.appspot.com/159803/diff/1/25#newcode50
Line 50: ctx.replaceMe(multi.makeStatement());
Good idea.  Lemme do this in a follow-on patch, though, because I
actually want to propose that Simplifier have a completely static API.
The only reason it's instance currently is for legacy reasons, accessing
primitive types through JProgram (which isn't needed anymore).

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

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

Reply via email to