diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-11-10 16:41:09 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-11-10 16:41:09 +0100 |
commit | fc5e2cf858e6b6aec3ac7b6cac0e899a388281dc (patch) | |
tree | f5c83423234030b9c200a0218a6bfe5a1d60335e /src/dotty/tools/dotc/core/Hashable.scala | |
parent | 0f5c1fd17c2acc23c3735dd4d8d3748e9eeef444 (diff) | |
download | dotty-fc5e2cf858e6b6aec3ac7b6cac0e899a388281dc.tar.gz dotty-fc5e2cf858e6b6aec3ac7b6cac0e899a388281dc.tar.bz2 dotty-fc5e2cf858e6b6aec3ac7b6cac0e899a388281dc.zip |
Address review comments.
Diffstat (limited to 'src/dotty/tools/dotc/core/Hashable.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Hashable.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Hashable.scala b/src/dotty/tools/dotc/core/Hashable.scala index 9d3356887..6a64f8655 100644 --- a/src/dotty/tools/dotc/core/Hashable.scala +++ b/src/dotty/tools/dotc/core/Hashable.scala @@ -88,6 +88,10 @@ trait Hashable { protected final def doHash(x1: Any, tp2: Type, tps3: List[Type]): Int = finishHash(hashing.mix(hashSeed, x1.hashCode), 1, tp2, tps3) + + protected final def doHash(x1: Int, x2: Int): Int = + finishHash(hashing.mix(hashing.mix(hashSeed, x1), x2), 1) + protected final def addDelta(hc: Int, delta: Int) = avoidNotCached(hc + delta) private def avoidNotCached(h: Int) = if (h == NotCached) NotCachedAlt else h |