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

[aarch64] Avoid slicing Address::extend

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • 20
    • hotspot
    • None
    • b24
    • aarch64

      The Address class contains a nested class called `extend`, which packages several values. It has several subclasses that exist only to provide named sets of some of those values via the constructor.

      (Almost) All uses of these subclasses are just to construct an argument to be passed by value to a function taking an extend object. So a slicing copy, with the derived type being of no real importance. While it works, it's icky and unnecessary.

      A better approach (that avoids copy-slicing) would be to replace those subclasses with static functions with the names of those subclasses, with each function returning an appropriately initialized extend object.

            kbarrett Kim Barrett
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: