@@ -115,33 +115,8 @@ public String getSymbolName() {
115115 return symbolName ;
116116 }
117117
118- public int compareTo (String methodName , String paramSignature , String returnTypeName ) {
119- int nameComparison = memberName .compareTo (methodName );
120- if (nameComparison != 0 ) {
121- return nameComparison ;
122- }
123- int typeComparison = valueType .getTypeName ().compareTo (returnTypeName );
124- if (typeComparison != 0 ) {
125- return typeComparison ;
126- }
127- String [] paramTypeNames = paramSignature .split (("," ));
128- int length ;
129- if (paramSignature .trim ().length () == 0 ) {
130- length = 0 ;
131- } else {
132- length = paramTypeNames .length ;
133- }
134- int paramCountComparison = getParamCount () - length ;
135- if (paramCountComparison != 0 ) {
136- return paramCountComparison ;
137- }
138- for (int i = 0 ; i < getParamCount (); i ++) {
139- int paraComparison = getParamTypeName (i ).compareTo (paramTypeNames [i ].trim ());
140- if (paraComparison != 0 ) {
141- return paraComparison ;
142- }
143- }
144- return 0 ;
118+ public int compareTo (String symbolNameForMethod ) {
119+ return symbolName .compareTo (symbolNameForMethod );
145120 }
146121
147122 public boolean isDeoptTarget () {
@@ -150,25 +125,6 @@ public boolean isDeoptTarget() {
150125
151126 @ Override
152127 public int compareTo (MethodEntry other ) {
153- assert other != null ;
154- int nameComparison = methodName ().compareTo (other .methodName ());
155- if (nameComparison != 0 ) {
156- return nameComparison ;
157- }
158- int typeComparison = valueType .getTypeName ().compareTo (other .valueType .getTypeName ());
159- if (typeComparison != 0 ) {
160- return typeComparison ;
161- }
162- int paramCountComparison = getParamCount () - other .getParamCount ();
163- if (paramCountComparison != 0 ) {
164- return paramCountComparison ;
165- }
166- for (int i = 0 ; i < getParamCount (); i ++) {
167- int paramComparison = getParamTypeName (i ).compareTo (other .getParamTypeName (i ));
168- if (paramComparison != 0 ) {
169- return paramComparison ;
170- }
171- }
172- return 0 ;
128+ return symbolName .compareTo (other .symbolName );
173129 }
174130}
0 commit comments