AbstractCompiler marks const in wrong position for is_c1/is_c2/is_jvmci

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 17
    • Affects Version/s: 11, 16, 17
    • Component/s: hotspot
    • b05
    • generic


      class AbstractCompiler : public CHeapObj<mtCompiler> {
      ...
        // Compiler type queries.
        const bool is_c1() { return _type == compiler_c1; }
        const bool is_c2() { return _type == compiler_c2; }
        const bool is_jvmci() { return _type == compiler_jvmci; }
        const CompilerType type() { return _type; }


      it doesn't make any sense to return a const scalar in this case.
      I think the original intention is to mark those member functions const.
        bool is_c1() const { return _type == compiler_c1; }

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

              Created:
              Updated:
              Resolved: