move some fields of SafePointNode from public to protected

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 17
    • Affects Version/s: 17
    • Component/s: hotspot
    • b06
    • generic

      One odd thing is SafePointNode::jvms() declares virtual but has never been overridden. It seems unnecessary.

      The second odd thing is that the member variable _jvms is declared 'JVMState* const'. I guess the intention is to protected it. It turned out it did not work out because set_jvms() was added later and casted away its constness. I suspect this behavior isn't defined.
       
      void set_jvms(JVMState* s) {
          *(JVMState**)&_jvms = s; // override const attribute in the accessor
        }

      I think we can hide set_jvms() using protected and open it for only two reasonable friends: JVMState and GraphKit.
      or we simply mark it as a public mutable member function.

            Assignee:
            Xin Liu
            Reporter:
            Xin Liu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: