Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8352620

C2: rename MemNode::memory_type() to MemNode::value_basic_type()

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 25
    • hotspot
    • Fix Understood

      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.

            snatarajan Saranya Natarajan
            rcastanedalo Roberto Castaneda Lozano
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: