diff options
author | bd-912 <bdunahu@colostate.edu> | 2024-04-20 01:03:23 -0600 |
---|---|---|
committer | bd-912 <bdunahu@colostate.edu> | 2024-04-20 01:03:23 -0600 |
commit | b7705e83c2026ff3983fc0b83f9b083d3e8be4c5 (patch) | |
tree | 9795143d8c2c9cb9fa7bac25a339533eb704cc32 /vaporize/library/CFGNode.java | |
parent | 63551aff281f1d289605fe2c9975a15124dbe643 (diff) |
CFG fix create edges only if nodes != (found by graphviz)
Diffstat (limited to 'vaporize/library/CFGNode.java')
-rw-r--r-- | vaporize/library/CFGNode.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/vaporize/library/CFGNode.java b/vaporize/library/CFGNode.java index 0afce60..b79ee6b 100644 --- a/vaporize/library/CFGNode.java +++ b/vaporize/library/CFGNode.java @@ -33,9 +33,12 @@ class CFGNode { */ // FIXME public boolean equals(Object other) { - return (other instanceof Node && - (((Node) other).sourcePos == - this.instruction.sourcePos)) || + return (other instanceof CFGNode && + (((CFGNode) other).instruction == + this.instruction)) || + (other instanceof Node && + (((Node) other).sourcePos == + this.instruction.sourcePos)) || (other instanceof Integer && (((Integer) other) .equals(this.instruction.sourcePos.line))); |