Integrated: 8343837: Remove unnecessary reinterpret_cast from C2AccessValuePtr
theoweidmannoracle
duke at openjdk.org
Mon Nov 11 08:21:04 UTC 2024
On Fri, 8 Nov 2024 13:25:26 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.
This pull request has now been integrated.
Changeset: 5b2f7f3b
Author: theoweidmannoracle <theo.weidmann at oracle.com>
Committer: Tobias Hartmann <thartmann at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/5b2f7f3b30adf9942fa8a3382e7661d6816fbb38
Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod
8343837: Remove unnecessary reinterpret_cast from C2AccessValuePtr
Reviewed-by: thartmann, kvn, kbarrett
-------------
PR: https://git.openjdk.org/jdk/pull/21977
More information about the hotspot-dev
mailing list