summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2009-10-14 14:47:57 +0000
committerIulian Dragos <jaguarul@gmail.com>2009-10-14 14:47:57 +0000
commitdff48d1ca52ec7dd55edbd3987bf9e849d519008 (patch)
tree59e56673b7df87d0123b91166023561c34712793
parentb880c5f2883f324ecb5bab3d52255651e8e8867c (diff)
downloadscala-dff48d1ca52ec7dd55edbd3987bf9e849d519008.tar.gz
scala-dff48d1ca52ec7dd55edbd3987bf9e849d519008.tar.bz2
scala-dff48d1ca52ec7dd55edbd3987bf9e849d519008.zip
Fixed stability issues for the optimised build,...
Fixed stability issues for the optimised build, this time for real.
-rw-r--r--src/compiler/scala/tools/nsc/CompilationUnits.scala4
-rw-r--r--src/compiler/scala/tools/nsc/transform/LambdaLift.scala12
2 files changed, 8 insertions, 8 deletions
diff --git a/src/compiler/scala/tools/nsc/CompilationUnits.scala b/src/compiler/scala/tools/nsc/CompilationUnits.scala
index bb25ab27f8..4640b15158 100644
--- a/src/compiler/scala/tools/nsc/CompilationUnits.scala
+++ b/src/compiler/scala/tools/nsc/CompilationUnits.scala
@@ -8,7 +8,7 @@ package scala.tools.nsc
import scala.tools.nsc.util.{FreshNameCreator,OffsetPosition,Position,NoPosition,SourceFile}
import scala.tools.nsc.io.AbstractFile
-import scala.collection.mutable.{HashSet, HashMap, ListBuffer}
+import scala.collection.mutable.{LinkedHashSet, HashSet, HashMap, ListBuffer}
trait CompilationUnits { self: Global =>
@@ -62,7 +62,7 @@ trait CompilationUnits { self: Global =>
/** The icode representation of classes in this compilation unit.
* It is empty up to phase 'icode'.
*/
- val icode: HashSet[icodes.IClass] = new HashSet
+ val icode: LinkedHashSet[icodes.IClass] = new LinkedHashSet
def error(pos: Position, msg: String) =
reporter.error(pos, msg)
diff --git a/src/compiler/scala/tools/nsc/transform/LambdaLift.scala b/src/compiler/scala/tools/nsc/transform/LambdaLift.scala
index f582ac3632..d962dba63f 100644
--- a/src/compiler/scala/tools/nsc/transform/LambdaLift.scala
+++ b/src/compiler/scala/tools/nsc/transform/LambdaLift.scala
@@ -10,7 +10,7 @@ package transform
import symtab._
import Flags._
import util.TreeSet
-import scala.collection.mutable.{HashMap, ListBuffer}
+import scala.collection.mutable.{HashMap, LinkedHashMap, ListBuffer}
import scala.tools.nsc.util.{Position, NoPosition}
abstract class LambdaLift extends InfoTransform {
@@ -45,13 +45,13 @@ abstract class LambdaLift extends InfoTransform {
class LambdaLifter(unit: CompilationUnit) extends explicitOuter.OuterPathTransformer(unit) {
/** A map storing free variables of functions and classes */
- private val free = new HashMap[Symbol, SymSet]
+ private val free = new LinkedHashMap[Symbol, SymSet]
/** A map storing the free variable proxies of functions and classes */
- private val proxies = new HashMap[Symbol, List[Symbol]]
+ private val proxies = new LinkedHashMap[Symbol, List[Symbol]]
/** A hashtable storing calls between functions */
- private val called = new HashMap[Symbol, SymSet]
+ private val called = new LinkedHashMap[Symbol, SymSet]
/** The set of symbols that need to be renamed. */
private val renamable = newSymSet
@@ -60,13 +60,13 @@ abstract class LambdaLift extends InfoTransform {
private var changedFreeVars: Boolean = _
/** Buffers for lifted out classes and methods */
- private val liftedDefs = new HashMap[Symbol, ListBuffer[Tree]]
+ private val liftedDefs = new LinkedHashMap[Symbol, ListBuffer[Tree]]
private type SymSet = TreeSet[Symbol]
private def newSymSet = new TreeSet[Symbol]((x, y) => x.isLess(y))
- private def symSet(f: HashMap[Symbol, SymSet], sym: Symbol): SymSet = f.get(sym) match {
+ private def symSet(f: LinkedHashMap[Symbol, SymSet], sym: Symbol): SymSet = f.get(sym) match {
case Some(ss) => ss
case None => val ss = newSymSet; f(sym) = ss; ss
}