Skip to content

Commit 7e9386b

Browse files
committed
remove redundant methods
1 parent be1f5e0 commit 7e9386b

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

substratevm/src/com.oracle.objectfile/src/com/oracle/objectfile/debugentry/ClassEntry.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ protected MethodEntry processMethod(DebugMethodInfo debugMethodInfo, DebugInfoBa
306306
*/
307307
FileEntry methodFileEntry = debugInfoBase.ensureFileEntry(debugMethodInfo);
308308
MethodEntry methodEntry = new MethodEntry(debugInfoBase, debugMethodInfo, methodFileEntry, methodName,
309-
this, resultType, paramTypeArray, paramNameArray);
309+
this, resultType, paramTypeArray, paramNameArray);
310310
indexMethodEntry(methodEntry);
311311

312312
return methodEntry;
@@ -366,12 +366,6 @@ public MethodEntry ensureMethodEntryForDebugRangeInfo(DebugRangeInfo debugRangeI
366366
return methodEntry;
367367
}
368368

369-
private static boolean listIsSorted(List<MethodEntry> list) {
370-
List<MethodEntry> copy = new ArrayList<>(list);
371-
copy.sort(MethodEntry::compareTo);
372-
return list.equals(copy);
373-
}
374-
375369
public List<MethodEntry> getMethods() {
376370
return methods;
377371
}

substratevm/src/com.oracle.objectfile/src/com/oracle/objectfile/debugentry/MethodEntry.java

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import com.oracle.objectfile.debuginfo.DebugInfoProvider.DebugMethodInfo;
3232
import jdk.vm.ci.meta.ResolvedJavaMethod;
3333

34-
public class MethodEntry extends MemberEntry implements Comparable<MethodEntry> {
34+
public class MethodEntry extends MemberEntry {
3535
final TypeEntry[] paramTypes;
3636
final String[] paramNames;
3737
static final int DEOPT = 1 << 0;
@@ -159,20 +159,4 @@ public void updateRangeInfo(DebugInfoBase debugInfoBase, DebugMethodInfo debugMe
159159
public String getSymbolName() {
160160
return symbolName;
161161
}
162-
163-
public int compareTo(ResolvedJavaMethod other) {
164-
/*
165-
* first try to sort methods by name, to have a nice sorting when printing types with ptype
166-
*/
167-
int comparisonResult = javaMethod.getName().compareTo(other.getName());
168-
if (comparisonResult != 0) {
169-
return comparisonResult;
170-
}
171-
return this.javaMethod.hashCode() - other.hashCode();
172-
}
173-
174-
@Override
175-
public int compareTo(MethodEntry other) {
176-
return compareTo(other.javaMethod);
177-
}
178162
}

0 commit comments

Comments
 (0)