JDK-8352620 : C2: rename MemNode::memory_type() to MemNode::value_basic_type()
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 25
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-03-21
  • Updated: 2025-05-08
  • Resolved: 2025-04-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 25
25 b21Fixed
Related Reports
Relates :  
Description
The current name 'MemNode::memory_type()' is misleading because the returned type is a property of the value that is loaded/stored, not the memory that is accessed. Usually, the two of them match, but for mismatched memory accesses (arising e.g. from using Unsafe or memory segments) they might differ, e.g. one might store a value of type 'short' into an array of elements of type 'long'.
This RFE proposes renaming 'MemNode::memory_type()' to 'MemNode::value_basic_type()' to clarify the intended meaning in these cases.
The rename was suggested by [~qamai] in the context of JDK-8351468, see https://github.com/openjdk/jdk/pull/24005#issuecomment-2724445592.
Comments
Changeset: 74a2c831 Branch: master Author: Saranya Natarajan <saranya.natarajan@oracle.com> Committer: Roberto CastaƱeda Lozano <rcastanedalo@openjdk.org> Date: 2025-04-24 09:33:15 +0000 URL: https://git.openjdk.org/jdk/commit/74a2c831a2af55c66317ca8aead53fde2a2a6900
24-04-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/24427 Date: 2025-04-03 21:06:17 +0000
11-04-2025