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

Remove Compile::print_method_impl

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 19
    • 19
    • hotspot
    • b08
    • generic
    • generic

      This is a follow-up task of JDK-8280274. I think it still makes sense to only evaluate "CompilerPhaseTypeHelper::to_string(cpt)" when NOT_PRODUCT is defined, but we can do that in the function body. We should avoid from messing around interfaces with macros.

      Actually, it's not necessary to have print_method_impl as a public interface at all. The only client of it is print_method().

      Here is the current interface of Compile::print_method
      V1: print_method(CompilerPhaseType cpt, int level)
      V2: print_method(CompilerPhaseType cpt, Node* n, int level)

      The only client of V2 is vector.cpp. It attempts to dump the phase name and vec_box node. It's impossible to to have n=NULL. No one will consume property <"phase :NULL">.

      I think we should go in this way.
      void Compile::print_method(CompilerPhaseType cpt, int level) {
        print_method(cpt, NULL, level);
      }

            xliu Xin Liu
            xliu Xin Liu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: