Skip to content

Commit 92291e7

Browse files
committed
Don't populate the concreteSpecMethod set in presentation compiler runs. This is safe because the presentation
compiler never runs the tree transformer (where this map is needed). This is a source of serious memory leaks in the IDE, but it wasn't visible before because the IDE didn't run the info transformers far enough. Interestingly, this is not a leak in batch runs: each element of the set is removed when the tree is transformed. For a nice graph of the effect of this change, see: http://i41.tinypic.com/xe0k7o.jpg
1 parent 9f96227 commit 92291e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1719,7 +1719,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers {
17191719
* that here are not garbage collected at the end of a compiler run!
17201720
*/
17211721
def addConcreteSpecMethod(m: Symbol) {
1722-
if (currentRun.compiles(m)) concreteSpecMethods += m
1722+
if (!forInteractive && currentRun.compiles(m)) concreteSpecMethods += m
17231723
}
17241724

17251725
private def makeArguments(fun: Symbol, vparams: List[Symbol]): List[Tree] = (

0 commit comments

Comments
 (0)