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

Compile::igv_print_graph_to_network doesn't use its second parameter

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • 25
    • hotspot
    • master

      The public method
      void Compile::igv_print_graph_to_network(const char* name, Node* node, GrowableArray<const Node*>& visible_nodes)
      doesn't use its second parameter `Node* node`: the implementation uses always `C->root()`, and doesn't allow to print a sub-graph without another root as one may think looking at the signature.

      Luckily, all the call-site are providing `C->root()` at the moment, so this bug is unnoticed.

      To keep a clean public interface, we should remove this unused parameter. We could also make use of it instead of always using `C->root()` but there seems to be no such need and it'd be inconsistent with `Compile::igv_print_method_to_file` that always prints from root.

            mchevalier Marc Chevalier
            mchevalier Marc Chevalier
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: