Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove JavaSourceParser #10085

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
319 changes: 0 additions & 319 deletions dev/core/src/com/google/gwt/dev/javac/JavaSourceParser.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ public abstract class JAbstractMethod implements

private List<JParameter> params = Lists.create();

private String[] realParameterNames = null;

private List<JClassType> thrownTypes = Lists.create();

private List<JTypeParameter> typeParams = Lists.create();
Expand Down Expand Up @@ -255,20 +253,11 @@ void addThrows(JClassType type) {

// Called only by a JParameter, passing itself as a reference for lookup.
String getRealParameterName(JParameter parameter) {
if (realParameterNames == null) {
fetchRealParameterNames();
}
int n = params.size();
for (int i = 0; i < n; ++i) {
// Identity tests are ok since identity is durable within an oracle.
if (params.get(i) == parameter) {
String realParameterName;
if (realParameterNames == null) {
realParameterName = StringInterner.get().intern("arg" + i);
} else {
realParameterName = StringInterner.get().intern(realParameterNames[i]);
}
return realParameterName;
return StringInterner.get().intern("arg" + i);
}
}
// TODO: report error if we are asked for an unknown JParameter?
Expand All @@ -294,9 +283,4 @@ boolean hasParamTypes(JType[] paramTypes) {
void setVarArgs() {
isVarArgs = true;
}

private void fetchRealParameterNames() {
realParameterNames = getEnclosingType().getOracle().getJavaSourceParser().getArguments(
this);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import com.google.gwt.core.ext.typeinfo.NotFoundException;
import com.google.gwt.core.ext.typeinfo.ParseException;
import com.google.gwt.core.ext.typeinfo.TypeOracleException;
import com.google.gwt.dev.javac.JavaSourceParser;
import com.google.gwt.dev.jjs.InternalCompilerException;
import com.google.gwt.dev.util.Name;
import com.google.gwt.dev.util.collect.HashMap;
Expand Down Expand Up @@ -248,8 +247,6 @@ private static List<String> modifierBitsToNamesForMethodsAndFields(int bits) {
*/
private JClassType javaScriptObject;

private final JavaSourceParser javaSourceParser = new JavaSourceParser();

/**
* Maps SingleJsoImpl interfaces to the implementing JSO subtype.
*/
Expand Down Expand Up @@ -665,10 +662,6 @@ void finish() {
recentTypes.clear();
}

JavaSourceParser getJavaSourceParser() {
return javaSourceParser;
}

private List<JClassType> classChain(JClassType cls) {
LinkedList<JClassType> chain = new LinkedList<JClassType>();
while (cls != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public static Test suite() {
suite.addTestSuite(CompilationUnitFileReferenceTest.class);
suite.addTestSuite(CompiledClassTest.class);
suite.addTestSuite(GWTProblemTest.class);
suite.addTestSuite(JavaSourceParserTest.class);
suite.addTestSuite(JdtBehaviorTest.class);
suite.addTestSuite(JdtCompilerTest.class);
suite.addTestSuite(Java7JdtCompilerTest.class);
Expand Down
Loading
Loading