diff options
author | Martin Odersky <odersky@gmail.com> | 2014-10-24 18:23:29 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-10-26 16:24:02 +0100 |
commit | 02afa11c809798bc218499ae26050c426d36f42c (patch) | |
tree | c6d8a595bd9fc64f4db862fa9fb2ea2464f67883 | |
parent | 17b78ba1f82824865f0371c168050c94bf5b3720 (diff) | |
download | dotty-02afa11c809798bc218499ae26050c426d36f42c.tar.gz dotty-02afa11c809798bc218499ae26050c426d36f42c.tar.bz2 dotty-02afa11c809798bc218499ae26050c426d36f42c.zip |
Initialize lambda lift maps
... so that they do not spill over between compilation units. It would be better to wipe the maps after
processing a compilation unit, but right now we do not have a hook for that. A better solution should
be possible once we replace init by "prepareUnit/transformUnit".
-rw-r--r-- | src/dotty/tools/dotc/transform/LambdaLift.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/transform/LambdaLift.scala b/src/dotty/tools/dotc/transform/LambdaLift.scala index f34b5479a..a28568594 100644 --- a/src/dotty/tools/dotc/transform/LambdaLift.scala +++ b/src/dotty/tools/dotc/transform/LambdaLift.scala @@ -280,6 +280,12 @@ class LambdaLift extends MiniPhaseTransform with IdentityDenotTransformer { this } override def init(implicit ctx: Context, info: TransformerInfo) = { + free.clear() + proxyMap.clear() + called.clear() + calledFromInner.clear() + liftedOwner.clear() + liftedDefs.clear() assert(ctx.phase == thisTransform) (new CollectDependencies).traverse(NoSymbol, ctx.compilationUnit.tpdTree) computeFreeVars() |