RFR(S): 8005079: fix LogCompilation for incremental inlining
Christian Thalinger
christian.thalinger at oracle.com
Thu Mar 20 23:48:18 UTC 2014
On Mar 20, 2014, at 2:55 PM, Roland Westrelin <roland.westrelin at oracle.com> wrote:
>>> Thanks for the comments. I’ll do the suggested changes.
>>>
>>>> src/share/tools/LogCompilation/src/com/sun/hotspot/tools/compiler/Method.java:
>>>>
>>>> + public boolean isSame(Method other) {
>>>>
>>>> You should override equals instead.
>>>
>>> It’s not a strict test for equality because I only compare 2 of the fields and not all of them. Do you think I should override equals anyway?
>>
>> I see more than two fields:
>>
>> + public boolean isSame(Method other) {
>> + return holder.equals(other.holder) && name.equals(other.name) &&
>> + arguments.equals(other.arguments) && returnType.equals(other.returnType);
>> + }
>>
>> and these are the ones that define equality, no?
>
> You count better than I do :-)
This time :-)
>
> http://cr.openjdk.java.net/~roland/8005079/webrev.02/
In order for equals to be correct you have to do an instanceof check.
>
> Roland.
More information about the hotspot-compiler-dev
mailing list