diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2009-05-20 08:24:29 +0000 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2009-05-20 08:24:29 +0000 |
commit | eb96cbb7bcb487b3b1c8aacad61c6594ff695b51 (patch) | |
tree | 61dea0fc18e7b103d8be7894480cd143b2f34626 /src/compiler | |
parent | 92be0221eac42864fdb4e60310758f4cae98a819 (diff) | |
download | scala-eb96cbb7bcb487b3b1c8aacad61c6594ff695b51.tar.gz scala-eb96cbb7bcb487b3b1c8aacad61c6594ff695b51.tar.bz2 scala-eb96cbb7bcb487b3b1c8aacad61c6594ff695b51.zip |
more debugging code for teh NoSuchElementException
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala b/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala index 833df01d83..0f610f2538 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala @@ -69,7 +69,7 @@ abstract class Pickler extends SubComponent { import scala.collection.mutable.LinkedHashMap private var entries = new Array[AnyRef](256) private var ep = 0 - private val index = new LinkedHashMap[AnyRef, Int] + private val index = new LinkedHashMap[AnyRef, (Int, Int)] /** Is symbol an existentially bound variable with a package as owner? * Such symbols should be treated as if they were local. @@ -108,13 +108,10 @@ abstract class Pickler extends SubComponent { entries = entries1 } entries(ep) = entry - // debug NoSuchElementException - index.saveTableStringIfResize(entry.hashCode()) - - index(entry) = ep + index(entry) = (ep, entry.hashCode()) // debug NoSuchElementException // debug NoSuchElementException if (index.get(entry) == None) { - println("could not add entry: "+ entry +"; "+ entry.hashCode()) + println("could not add entry: "+ entry) index.printHashTable(entry.hashCode()) } ep = ep + 1 @@ -469,10 +466,10 @@ abstract class Pickler extends SubComponent { */ private def writeRef(ref: AnyRef) { try { - writeNat(index(ref)) + writeNat(index(ref)._1) // debug NoSuchElementException } catch { case e: java.util.NoSuchElementException => - println("entry not found: "+ ref +"; "+ ref.hashCode()) + println("entry not found: "+ ref) index.printHashTable(ref.hashCode()) throw e } |