summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/transform/LambdaLift.scala
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 /src/compiler/scala/tools/nsc/transform/LambdaLift.scala
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.
Diffstat (limited to 'src/compiler/scala/tools/nsc/transform/LambdaLift.scala')
-rw-r--r--src/compiler/scala/tools/nsc/transform/LambdaLift.scala12
1 files changed, 6 insertions, 6 deletions
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
}