From b870bc345e29076db970064710c3473bab9a2fda Mon Sep 17 00:00:00 2001 From: bdemsky Date: Mon, 6 Aug 2007 09:17:08 +0000 Subject: [PATCH] forgot file --- .../src/Analysis/Locality/TempNodePair.java | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Robust/src/Analysis/Locality/TempNodePair.java diff --git a/Robust/src/Analysis/Locality/TempNodePair.java b/Robust/src/Analysis/Locality/TempNodePair.java new file mode 100644 index 00000000..ba3828a4 --- /dev/null +++ b/Robust/src/Analysis/Locality/TempNodePair.java @@ -0,0 +1,41 @@ +package Analysis.Locality; +import IR.Flat.*; + + +public class TempNodePair { + TempDescriptor tmp; + FlatNode fn; + + public TempNodePair(TempDescriptor tmp) { + this.tmp=tmp; + } + + public TempDescriptor getTemp() { + return tmp; + } + + public void setNode(FlatNode fn) { + this.fn=fn; + } + + public FlatNode getNode() { + return fn; + } + + public boolean equals(Object o) { + if (o instanceof TempNodePair) { + TempNodePair tnp=(TempNodePair)o; + if (tnp.fn!=null||fn!=null) { + // need to check flat node equivalence also + if (tnp.fn==null||fn==null||(!fn.equals(tnp.fn))) + return false; + } + return tmp.equals(tnp.tmp); + } + return false; + } + + public int hashCode() { + return tmp.hashCode(); + } +} -- 2.34.1