RFR: 8343837: Remove unnecessary reinterpret_cast from C2AccessValuePtr [v3]
duke
duke at openjdk.org
Mon Nov 11 07:01:39 UTC 2024
On Fri, 8 Nov 2024 13:57:19 GMT, theoweidmannoracle <duke at openjdk.org> wrote:
>> C2AccessValuePtr contains a reinterpret cast from TypePtr* to its base class Type*. This cast was added in [JDK-8202377](https://bugs.openjdk.org/browse/JDK-8202377), due to a circular dependency problem, which no longer exists. The code compiles fine without it and this cast was removed.
>>
>> Furthermore, a downcast from Type* to TypePtr* exists in this class using reinterpret_cast. This is replaced with Type::is_ptr, which performs the downcast safely by including an assert.
>
> theoweidmannoracle has updated the pull request incrementally with one additional commit since the last revision:
>
> Update copyright
@theoweidmannoracle
Your change (at version 35c77fb2736c0f13dc27aa3edadb10191e58df26) is now ready to be sponsored by a Committer.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21977#issuecomment-2467380617
More information about the hotspot-dev
mailing list