Sort & format. git-svn-id: https://google-web-toolkit.googlecode.com/svn/releases/1.6@4458 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/Pruner.java b/dev/core/src/com/google/gwt/dev/jjs/impl/Pruner.java index 2d39be2..0c9859a 100644 --- a/dev/core/src/com/google/gwt/dev/jjs/impl/Pruner.java +++ b/dev/core/src/com/google/gwt/dev/jjs/impl/Pruner.java
@@ -488,9 +488,12 @@ boolean doSkip = false; JExpression lhs = x.getLhs(); if (lhs.hasSideEffects() || isVolatileField(lhs)) { - // If the lhs has side effects, skipping it would lose the side effect. - // If the lhs is volatile, also keep it. This behavior provides a useful - // idiom for test cases to prevent code from being pruned. + /* + * If the lhs has side effects, skipping it would lose the side + * effect. If the lhs is volatile, also keep it. This behavior + * provides a useful idiom for test cases to prevent code from being + * pruned. + */ } else if (lhs instanceof JLocalRef) { // locals are ok to skip doSkip = true; @@ -526,6 +529,15 @@ } @Override + public boolean visit(JClassLiteral x, Context ctx) { + // Works just like JFieldRef to a static field. + JField field = x.getField(); + rescue(field.getEnclosingType(), true, false); + rescue(field); + return true; + } + + @Override public boolean visit(JClassType type, Context ctx) { assert (referencedTypes.contains(type)); boolean isInstantiated = instantiatedTypes.contains(type); @@ -581,15 +593,6 @@ } @Override - public boolean visit(JClassLiteral x, Context ctx) { - // Works just like JFieldRef to a static field. - JField field = x.getField(); - rescue(field.getEnclosingType(), true, false); - rescue(field); - return true; - } - - @Override public boolean visit(JFieldRef ref, Context ctx) { JField target = ref.getField(); @@ -914,6 +917,11 @@ } @Override + public boolean visit(JClassType x, Context ctx) { + return rescuer.instantiatedTypes.contains(x); + } + + @Override public boolean visit(JMethod x, Context ctx) { if (referencedNonTypes.contains(x)) { return false; @@ -930,11 +938,6 @@ } @Override - public boolean visit(JClassType x, Context ctx) { - return rescuer.instantiatedTypes.contains(x); - } - - @Override public boolean visit(JProgram x, Context ctx) { didRescue = false; return true;