MCPcopy Index your code
hub / github.com/clojure/clojure / pushSuccessors

Method pushSuccessors

src/jvm/clojure/asm/Label.java:589–606  ·  view source on GitHub ↗

Adds the successors of this label in the method's control flow graph (except those corresponding to a jsr target, and those already in a list of labels) to the given list of blocks to process, and returns the new list. @param listOfLabelsToProcess a list of basic blocks to process, linked together

(final Label listOfLabelsToProcess)

Source from the content-addressed store, hash-verified

587 * @return the new list of blocks to process.
588 */
589 private Label pushSuccessors(final Label listOfLabelsToProcess) {
590 Label newListOfLabelsToProcess = listOfLabelsToProcess;
591 Edge outgoingEdge = outgoingEdges;
592 while (outgoingEdge != null) {
593 // By construction, the second outgoing edge of a basic block that ends with a jsr instruction
594 // leads to the jsr target (see {@link #FLAG_SUBROUTINE_CALLER}).
595 boolean isJsrTarget =
596 (flags & Label.FLAG_SUBROUTINE_CALLER) != 0 && outgoingEdge == outgoingEdges.nextEdge;
597 if (!isJsrTarget && outgoingEdge.successor.nextListElement == null) {
598 // Add this successor to the list of blocks to process, if it does not already belong to a
599 // list of labels.
600 outgoingEdge.successor.nextListElement = newListOfLabelsToProcess;
601 newListOfLabelsToProcess = outgoingEdge.successor;
602 }
603 outgoingEdge = outgoingEdge.nextEdge;
604 }
605 return newListOfLabelsToProcess;
606 }
607
608 // -----------------------------------------------------------------------------------------------
609 // Overridden Object methods

Callers 2

markSubroutineMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected