RFR[T]: 8240246: Avoid cast_to_oop from char*

David Holmes david.holmes at oracle.com
Sun Mar 1 23:13:03 UTC 2020


On 29/02/2020 6:24 pm, Kim Barrett wrote:
>> On Feb 29, 2020, at 12:11 AM, David Holmes <david.holmes at oracle.com> wrote:
>>
>> Hi Kim,
>>
>> On 29/02/2020 11:44 am, Kim Barrett wrote:
>>> Please review this trivial change of a cast_to_oop argument from char*
>>> to address.  This removes the only call of that function with a char*
>>> argument.
>>> CR:
>>> https://bugs.openjdk.java.net/browse/JDK-8240246
>>> Webrev:
>>> https://cr.openjdk.java.net/~kbarrett/8240246/open.00/
>>
>> Okay - trivial change. But any reason not to simply use uint8_t directly?
> 
> The desired type here is “address”.
> 
> These are in globalDefinitions.hpp:
> typedef unsigned char u_char;
> typedef u_char* address;

I misinterpreted the comment in the bug about equivalence to uint8_t*.

Thanks,
David

> I could have used RemovePointer<address>::type :)
> 
>>
>> Thanks,
>> David
>>
>>> Testing:
>>> mach5 tier1
> 
> 


More information about the hotspot-dev mailing list