On Fri, 18 Aug 2023 02:13:57 GMT, David Holmes <dhol...@openjdk.org> wrote:

>> template<typename K> bool primitive_equals(const K& k0, const K& k1) {
>>   return k0 == k1;
>> }
>> 
>> template<typename K> int primitive_compare(const K& k0, const K& k1) {
>>   return ((k0 < k1) ? -1 : (k0 == k1) ? 0 : 1);
>> }
>> 
>> 
>> This is the primitive_compare we added with one of these patches.  This 
>> compares pointers and because of the template, it doesn't need to look like 
>> this:
>> 
>> 
>> int Symbol::fast_compare(const Symbol* other) const {
>>  return (((uintptr_t)this < (uintptr_t)other) ? -1
>>    : ((uintptr_t)this == (uintptr_t) other) ? 0 : 1);
>> }
>> 
>> 
>> I can file another RFE so that we can argue about the name.  The name was 
>> what we agreed upon earlier, and I showed it with primtiive_equals and 
>> primitive_hash because it provides the same sort of default pointer 
>> comparison.
>> Please file an RFE so that this can be discussed independently of this PR.  
>> We can change them all at one time.
>
> [JDK-8314553](https://bugs.openjdk.org/browse/JDK-8314553)

Thanks for the RFE.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/15233#discussion_r1298372237

Reply via email to