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

theoweidmannoracle duke at openjdk.org
Fri Nov 8 13:57:19 UTC 2024


> 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

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/21977/files
  - new: https://git.openjdk.org/jdk/pull/21977/files/dfe4d65e..35c77fb2

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=21977&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=21977&range=01-02

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/21977.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/21977/head:pull/21977

PR: https://git.openjdk.org/jdk/pull/21977


More information about the hotspot-dev mailing list