MCPcopy Create free account
hub / github.com/SeaOfNodes/Simple / equals

Method equals

chapter09/src/main/java/com/seaofnodes/simple/node/Node.java:511–521  ·  view source on GitHub ↗
( Object o )

Source from the content-addressed store, hash-verified

509 }
510
511 // Return the immediate dominator of this Node and compute dom tree depth.
512 Node idom() { return in(0); }
513
514 // Find the lowest common ancestor in the current dominator tree.
515 Node domLCA(Node rhs) {
516 if( rhs==null ) return this;
517 Node lhs = this;
518 while( lhs != rhs ) {
519 if( lhs==null || rhs==null ) return null;
520 int comp = lhs.idepth() - rhs.idepth();
521 if( comp >= 0 ) lhs = lhs.idom();
522 if( comp <= 0 ) rhs = rhs.idom();
523 }
524 return lhs;

Callers

nothing calls this directly

Calls 3

inMethod · 0.95
eqMethod · 0.95
sizeMethod · 0.45

Tested by

no test coverage detected