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

add assert for non-NULL assumption for return of unique_ctrl_out

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 19
    • 19
    • hotspot
    • b11

      unique_ctrl_out is used in contexts where NULL may be a valid return, and is also used in contexts where NULL is not expected.

      Improve the code by having two functions instead:
      unique_ctrl_out_or_null: return the unique control out, or NULL if there is no or more than one control out.
      unique_ctrl_out: return the unique control out, assert if there is no or more than one control out.

      Keep the use of unique_ctrl_out where we expect the node to have exactly one control out. Change the use to unique_ctrl_out_or_null where also NULL iis an expected return value.

            epeter Emanuel Peter
            epeter Emanuel Peter
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: