RFR: 8343837: Remove unnecessary reinterpret_cast from C2AccessValuePtr [v3]

Kim Barrett kbarrett at openjdk.org
Mon Nov 11 07:27:38 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

Marked as reviewed by kbarrett (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/21977#pullrequestreview-2426287253


More information about the hotspot-dev mailing list