summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2009-05-19 09:21:55 +0000
committerLukas Rytz <lukas.rytz@epfl.ch>2009-05-19 09:21:55 +0000
commite7d6bfb2ae497f2e9d124c5bfaca7b975420566c (patch)
treef4c2d09ac14f06ef4153c59bcc755cf3ff84c7e4 /src/compiler
parent3b5f98fd1cc16c0a21c3d8cff368f1a86aa8de93 (diff)
downloadscala-e7d6bfb2ae497f2e9d124c5bfaca7b975420566c.tar.gz
scala-e7d6bfb2ae497f2e9d124c5bfaca7b975420566c.tar.bz2
scala-e7d6bfb2ae497f2e9d124c5bfaca7b975420566c.zip
some temporary code to find the bug (NoSuchElem...
some temporary code to find the bug (NoSuchElementException) in LinkedHashMap
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala b/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala
index c26ea38b55..833df01d83 100644
--- a/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala
+++ b/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala
@@ -108,7 +108,15 @@ abstract class Pickler extends SubComponent {
entries = entries1
}
entries(ep) = entry
+ // debug NoSuchElementException
+ index.saveTableStringIfResize(entry.hashCode())
+
index(entry) = ep
+ // debug NoSuchElementException
+ if (index.get(entry) == None) {
+ println("could not add entry: "+ entry +"; "+ entry.hashCode())
+ index.printHashTable(entry.hashCode())
+ }
ep = ep + 1
true
}
@@ -459,7 +467,16 @@ abstract class Pickler extends SubComponent {
*
* @param ref ...
*/
- private def writeRef(ref: AnyRef) { writeNat(index(ref)) }
+ private def writeRef(ref: AnyRef) {
+ try {
+ writeNat(index(ref))
+ } catch {
+ case e: java.util.NoSuchElementException =>
+ println("entry not found: "+ ref +"; "+ ref.hashCode())
+ index.printHashTable(ref.hashCode())
+ throw e
+ }
+ }
private def writeRefs(refs: List[AnyRef]) { refs foreach writeRef }
/** Write name, owner, flags, and info of a symbol.