summaryrefslogtreecommitdiff
path: root/Source/Core/AbsyQuant.cs
diff options
context:
space:
mode:
authorGravatar Dan Liew <daniel.liew@imperial.ac.uk>2015-02-02 16:00:34 +0000
committerGravatar Dan Liew <daniel.liew@imperial.ac.uk>2015-02-02 16:00:34 +0000
commita7843fac5cfc4b5d755a10fc61dce896cc881d9e (patch)
tree7c5c6b9776cdab8b17bb20d29b8584bd74d0e471 /Source/Core/AbsyQuant.cs
parent964ee79dcfd492afd6c4a7c21b67089b76cd78e0 (diff)
Fix performance issue in ComputeHashCode() methods of Expr classes.
If constructing immutable Expr bottom up this would be very inefficient because the hashcode would be recomputed unnecessarily. Now just make ComputeHashCode() methods call GetHashCode() on Expr instead.
Diffstat (limited to 'Source/Core/AbsyQuant.cs')
-rw-r--r--Source/Core/AbsyQuant.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/AbsyQuant.cs b/Source/Core/AbsyQuant.cs
index 1bd16e4a..2258e553 100644
--- a/Source/Core/AbsyQuant.cs
+++ b/Source/Core/AbsyQuant.cs
@@ -143,7 +143,7 @@ namespace Microsoft.Boogie {
h = ( 53 * h ) + dummyVar.GetHashCode();
}
- h ^= this.Body.ComputeHashCode();
+ h ^= this.Body.GetHashCode();
// DO NOT USE TypeParameters.GetHashCode() because we want structural
// identical Expr to have the same hash code **not** identical references