diff options
Diffstat (limited to 'src/compiler')
7 files changed, 11 insertions, 12 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala index 779e16aad4..ffdedd0cfc 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala @@ -1700,7 +1700,7 @@ abstract class GenJVM extends SubComponent { def indexOf(local: Local): Int = { assert(local.index >= 0, - "Invalid index for: " + local + "{" + local.hashCode + "}: ") + "Invalid index for: " + local + "{" + local.## + "}: ") local.index } @@ -1715,7 +1715,7 @@ abstract class GenJVM extends SubComponent { for (l <- m.locals) { if (settings.debug.value) - log("Index value for " + l + "{" + l.hashCode + "}: " + idx) + log("Index value for " + l + "{" + l.## + "}: " + idx) l.index = idx idx += sizeOf(l.kind) } diff --git a/src/compiler/scala/tools/nsc/io/VirtualFile.scala b/src/compiler/scala/tools/nsc/io/VirtualFile.scala index 005ede4843..421e39195d 100644 --- a/src/compiler/scala/tools/nsc/io/VirtualFile.scala +++ b/src/compiler/scala/tools/nsc/io/VirtualFile.scala @@ -31,7 +31,7 @@ class VirtualFile(val name: String, _path: String) extends AbstractFile */ def this(name: String) = this(name, name) - override def hashCode = name.hashCode + override def hashCode = name.## override def equals(that: Any) = cond(that) { case x: VirtualFile => x.name == name } //######################################################################## diff --git a/src/compiler/scala/tools/nsc/symtab/Types.scala b/src/compiler/scala/tools/nsc/symtab/Types.scala index dc59587c4a..e0987c2d8b 100644 --- a/src/compiler/scala/tools/nsc/symtab/Types.scala +++ b/src/compiler/scala/tools/nsc/symtab/Types.scala @@ -2301,7 +2301,7 @@ A type's typeSymbol should never be inspected directly. origin+ (if(typeArgs.isEmpty) "" else (typeArgs map (_.safeToString)).mkString("[ ", ", ", " ]")) // +"#"+tid //DEBUG if (constr.inst eq null) "<null " + origin + ">" - else if (settings.debug.value) varString+"(@"+constr.hashCode+")"+constr.toString + else if (settings.debug.value) varString+"(@"+constr.## +")"+constr.toString else if (constr.inst eq NoType) varString else constr.inst.toString } diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index afe5e2fddd..7469388a08 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -316,7 +316,7 @@ trait Contexts { self: Analyzer => override def toString(): String = { if (this == NoContext) "NoContext" else owner.toString() + " @ " + tree.getClass() + - " " + tree.toString() + ", scope = " + scope.hashCode() + + " " + tree.toString() + ", scope = " + scope.## + " " + scope.toList + "\n:: " + outer.toString() } diff --git a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala index 66547fbd2f..20d367337f 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala @@ -126,8 +126,7 @@ self: Analyzer => case _ => false } - override def hashCode = - name.hashCode + pre.hashCode + sym.hashCode + override def hashCode = name.## + pre.## + sym.## override def toString = "ImplicitInfo(" + name + "," + pre + "," + sym + ")" } diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index 03b2d5574c..d56b8ed944 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -297,7 +297,7 @@ trait Namers { self: Analyzer => private def enterSymFinishWith(tree: Tree, tparams: List[TypeDef]) { val sym = tree.symbol - if (settings.debug.value) log("entered " + sym + " in " + context.owner + ", scope-id = " + context.scope.hashCode()); + if (settings.debug.value) log("entered " + sym + " in " + context.owner + ", scope-id = " + context.scope.## ) var ltype = namerOf(sym).typeCompleter(tree) if (!tparams.isEmpty) { //@M! TypeDef's type params are handled differently diff --git a/src/compiler/scala/tools/nsc/util/HashSet.scala b/src/compiler/scala/tools/nsc/util/HashSet.scala index 72448fb19a..aa6e19538c 100644 --- a/src/compiler/scala/tools/nsc/util/HashSet.scala +++ b/src/compiler/scala/tools/nsc/util/HashSet.scala @@ -26,7 +26,7 @@ class HashSet[T >: Null <: AnyRef](val label: String, initialCapacity: Int) exte private def index(x: Int): Int = math.abs(x % capacity) def findEntryOrUpdate(x: T): T = { - var h = index(x.hashCode()) + var h = index(x.##) var entry = table(h) while (entry ne null) { if (x == entry) @@ -42,7 +42,7 @@ class HashSet[T >: Null <: AnyRef](val label: String, initialCapacity: Int) exte } def findEntry(x: T): T = { - var h = index(x.hashCode()) + var h = index(x.##) var entry = table(h) while ((entry ne null) && entry != x) { h = index(h + 1) @@ -52,7 +52,7 @@ class HashSet[T >: Null <: AnyRef](val label: String, initialCapacity: Int) exte } def addEntry(x: T) { - var h = index(x.hashCode()) + var h = index(x.##) var entry = table(h) while (entry ne null) { if (entry == x) return @@ -76,7 +76,7 @@ class HashSet[T >: Null <: AnyRef](val label: String, initialCapacity: Int) exte } private def addOldEntry(x: T) { - var h = index(x.hashCode()) + var h = index(x.##) var entry = table(h) while (entry ne null) { h = index(h + 1) |