Reviewers: zundel, jbrosenberg,

Message:
Tiny code review.

Description:
Bugfixes in ControlFlowAnalyzer
- Instantiating Interface[] failed to rescue Object[]
- Field initializers being visited twice


Please review this at http://gwt-code-reviews.appspot.com/1443807/

Affected files:
  M dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java


Index: dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java
diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java b/dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java index 591b3ae2ad0231b508f837e6319a0f72ce6afd5c..0a4e3024b349de60dbcd9c19afb08fe490ba8242 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java
@@ -107,6 +107,10 @@ public class ControlFlowAnalyzer {
rescue(program.getTypeArray(superClass, dims), true, isInstantiated);
           didSuperType = true;
         }
+      } else if (leafType instanceof JInterfaceType) {
+        // Intf[] -> Object[]
+ rescue(program.getTypeArray(program.getTypeJavaLangObject(), dims), true, isInstantiated);
+        didSuperType = true;
       }
       if (!didSuperType) {
         if (dims > 1) {
@@ -310,11 +314,6 @@ public class ControlFlowAnalyzer {
         }
       }

-      // visit any field initializers
-      for (JField it : type.getFields()) {
-        accept(it);
-      }
-
       rescueMembersIfInstantiable(type);
       return false;
     }


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

Reply via email to