Stephen Haberman has uploaded a new change for review.
https://gwt-review.googlesource.com/3470
Change subject: Fix binary vs. internal variable names, remove unused Name
code.
..
Fix binary vs. internal variable names, remove unused Name code.
Change-Id: I540b1225efe7f81f0fc3ac50871cc66d1e99e753
---
M dev/core/src/com/google/gwt/dev/javac/CompilationState.java
M dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java
M dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
M dev/core/src/com/google/gwt/dev/javac/JsniChecker.java
M dev/core/src/com/google/gwt/dev/javac/Resolver.java
M dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java
M dev/core/src/com/google/gwt/dev/javac/asm/ResolveMethodSignature.java
M dev/core/src/com/google/gwt/dev/javac/asm/ResolveTypeSignature.java
M dev/core/src/com/google/gwt/dev/util/Name.java
M dev/core/test/com/google/gwt/dev/javac/asm/ResolveGenericsTest.java
M dev/core/test/com/google/gwt/dev/util/NameTest.java
11 files changed, 66 insertions(+), 219 deletions(-)
diff --git a/dev/core/src/com/google/gwt/dev/javac/CompilationState.java
b/dev/core/src/com/google/gwt/dev/javac/CompilationState.java
index 5e8844c..c043dfb 100644
--- a/dev/core/src/com/google/gwt/dev/javac/CompilationState.java
+++ b/dev/core/src/com/google/gwt/dev/javac/CompilationState.java
@@ -36,7 +36,7 @@
public class CompilationState {
/**
- * Classes mapped by binary name.
+ * Classes mapped by internal name.
*/
protected final Map classFileMap = new
HashMap();
@@ -105,7 +105,7 @@
}
/**
- * Returns a map of all compiled classes by binary name.
+ * Returns a map of all compiled classes by internal name.
*/
public Map getClassFileMap() {
return exposedClassFileMap;
diff --git
a/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java
b/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java
index d450ca7..72caade 100644
--- a/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java
+++ b/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java
@@ -83,8 +83,8 @@
Map jsniRefs = new HashMap();
JsniChecker.check(cud, jsoState, jsniMethods, jsniRefs, new
JsniChecker.TypeResolver() {
@Override
-public ReferenceBinding resolveType(String typeName) {
- ReferenceBinding resolveType =
compiler.resolveType(typeName);
+public ReferenceBinding resolveType(String sourceOrBinaryName)
{
+ ReferenceBinding resolveType =
compiler.resolveType(sourceOrBinaryName);
if (resolveType != null) {
jsniDeps.add(String.valueOf(resolveType.qualifiedSourceName()));
}
diff --git a/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
b/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
index 2f7e90d..4438f97 100644
--- a/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
+++ b/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
@@ -501,9 +501,9 @@
}
public NameEnvironmentAnswer findType(char[][] compoundTypeName) {
- char[] binaryNameChars =
CharOperation.concatWith(compoundTypeName, '/');
- String binaryName = String.valueOf(binaryNameChars);
- CompiledClass compiledClass = binaryTypes.get(binaryName);
+ char[] internalNameChars =
CharOperation.concatWith(compoundTypeName, '/');
+ String internalName = String.valueOf(internalNameChars);
+ CompiledClass compiledClass = internalTypes.get(internalName);
try {
if (compiledClass != null) {
return compiledClass.getNameEnvironmentAnswer();
@@ -511,11 +511,11 @@
} catch (ClassFormatException ex) {
// fall back to binary class
}
- if (isPackage(binaryName)) {
+ if (isPackage(internalName)) {
return null;
}
if (additionalTypeProviderDelegate != null) {
-GeneratedUnit unit =
additionalTypeProviderDelegate.doFindAdditionalType(binaryName);
+GeneratedUnit unit =
additionalTypeProviderDelegate.doFindAdditionalType(internalName);
if (unit != null) {
CompilationUnitBuilder b = CompilationUnitBuilder.create(unit);
Adapter a = new Adapter(b);
@@ -523,7 +523,7 @@
}
}
try {
-URL resource = getClassLoader().getResource(binaryName + ".class");
+URL resource = getClassLoader().getResource(internalName
+ ".class");
if (resource != null) {
InputStream openStream = resource.openStream();
try {
@@ -656,19 +656,20 @@
return options;
}
- public static ReferenceBinding resolveType(LookupEnvironment
lookupEnvironment, String typeName) {
+ private static ReferenceBinding resolveType(LookupEnvironment
lookupEnvironment,
+ String sourceOrBinaryName) {
ReferenceBinding type = null;
-int p = t