Revision: 9598
Author: sco...@google.com
Date: Mon Jan 24 06:53:26 2011
Log: Some fixes to "Only JClassTypes should have a super class".

http://code.google.com/p/google-web-toolkit/source/detail?r=9598

Modified:
 /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java

=======================================
--- /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java Sat Jan 22 17:19:44 2011 +++ /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java Mon Jan 24 06:53:26 2011
@@ -117,7 +117,8 @@
               true, isInstantiated);
         } else {
           // anything[] -> Object
-          rescue(program.getTypeJavaLangObject(), true, isInstantiated);
+ // But instead of Object, rescue the base Array implementation type.
+          rescue(baseArrayType, true, isInstantiated);
         }
       }

@@ -130,8 +131,6 @@
         }
       }

-      // Rescue the base Array type
-      rescue(program.getIndexedType("Array"), true, isInstantiated);
       return false;
     }

@@ -710,6 +709,7 @@
     }
   }

+  private JDeclaredType baseArrayType;
   private DependencyRecorder dependencyRecorder;

   private Set<JField> fieldsWritten = new HashSet<JField>();
@@ -739,6 +739,7 @@

   public ControlFlowAnalyzer(ControlFlowAnalyzer cfa) {
     program = cfa.program;
+    baseArrayType = cfa.baseArrayType;
     fieldsWritten = new HashSet<JField>(cfa.fieldsWritten);
     instantiatedTypes = new HashSet<JReferenceType>(cfa.instantiatedTypes);
     liveFieldsAndMethods = new HashSet<JNode>(cfa.liveFieldsAndMethods);
@@ -752,6 +753,7 @@

   public ControlFlowAnalyzer(JProgram program) {
     this.program = program;
+    baseArrayType = program.getIndexedType("Array");
     buildMethodsOverriding();
   }

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

Reply via email to