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

Last 2 parameters of ReturnNode::ReturnNode are swapped in the declaration

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • 11, 17, 21, 25
    • hotspot
    • b14

      The declaration looks like:
      ReturnNode( uint edges, Node *cntrl, Node *i_o, Node *memory, Node *retadr, Node *frameptr );
      But the definition is:
      ReturnNode::ReturnNode(uint edges, Node *cntrl, Node *i_o, Node *memory, Node *frameptr, Node *retadr )

      Notice the last two parameters are swapped. Given the implementation, the definition is right, and the declaration should be fixed. I found 2 usages of this ctor (in GraphKit::gen_stub and Compile::return_values) and they seem correct. Maybe there are more?

      This swap is misleading for someone who would read the declaration.

            mhassig Manuel Hassig
            mchevalier Marc Chevalier
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: