Some fixes to "Only JClassTypes should have a super class".
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@9598 8db76d5a-ed1c-0410-87a9-c151d255dfc7
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 1172786..8f5a3b3 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
@@ -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();
}