Skip to content

Commit a3ef72b

Browse files
committed
Make LambdaLift diagnostics log messages instead of printing them directly.
1 parent 70946d7 commit a3ef72b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/dotty/tools/dotc/transform/LambdaLift.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class LambdaLift extends MiniPhaseTransform with IdentityDenotTransformer { this
8888
}
8989

9090
def narrowLiftedOwner(sym: Symbol, owner: Symbol)(implicit ctx: Context) = {
91-
println(i"narrow lifted $sym to $owner")
91+
ctx.log(i"narrow lifted $sym to $owner")
9292
if (sym.owner.skipConstructor.isTerm &&
9393
owner.isProperlyContainedIn(liftedOwner(sym))) {
9494
changedLiftedOwner = true
@@ -128,7 +128,7 @@ class LambdaLift extends MiniPhaseTransform with IdentityDenotTransformer { this
128128
*/
129129
private def markFree(sym: Symbol, enclosure: Symbol)(implicit ctx: Context): Boolean = try {
130130
if (!enclosure.exists) throw new NoPath
131-
println(i"mark free: ${sym.showLocated} with owner ${sym.maybeOwner} marked free in $enclosure")
131+
ctx.log(i"mark free: ${sym.showLocated} with owner ${sym.maybeOwner} marked free in $enclosure")
132132
(enclosure == sym.enclosure) || {
133133
ctx.debuglog(i"$enclosure != ${sym.enclosure}")
134134
narrowLiftedOwner(enclosure, sym.enclosingClass)
@@ -202,7 +202,6 @@ class LambdaLift extends MiniPhaseTransform with IdentityDenotTransformer { this
202202
private def computeFreeVars()(implicit ctx: Context): Unit =
203203
do {
204204
changedFreeVars = false
205-
// println(s"called = ${called.toList map { case (from, to) => from.showLocated + " -> " + to.toList.map(_.showLocated) }}")
206205
for {
207206
caller <- called.keys
208207
callee <- called(caller)

0 commit comments

Comments
 (0)