Skip to content

Commit 4447d83

Browse files
authored
Merge pull request #5990 from dotty-staging/extract-tasty-kernel
Add tasty.reflect.Kernel
2 parents 9f5b3c3 + cf304cb commit 4447d83

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+4657
-4256
lines changed

compiler/src/dotty/tools/dotc/consumetasty/TastyConsumerPhase.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class TastyConsumerPhase(consumer: TastyConsumer) extends Phase {
1111
override def phaseName: String = "tastyConsumer"
1212

1313
override def run(implicit ctx: Context): Unit = {
14-
val reflect = new ReflectionImpl(ctx)
14+
val reflect = ReflectionImpl(ctx)
1515
consumer(reflect)(ctx.compilationUnit.tpdTree)
1616
}
1717

compiler/src/dotty/tools/dotc/decompiler/DecompilationPrinter.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ class DecompilationPrinter extends Phase {
4343
} else {
4444
val unitFile = unit.source.toString.replace("\\", "/").replace(".class", ".tasty")
4545
out.println(s"/** Decompiled from $unitFile */")
46-
out.println(new ReflectionImpl(ctx).showSourceCode.showTree(unit.tpdTree)(ctx))
46+
val refl = ReflectionImpl(ctx)
47+
out.println(new refl.SourceCodePrinter().showTree(unit.tpdTree)(ctx))
4748
}
4849
}
4950
}

compiler/src/dotty/tools/dotc/decompiler/IDEDecompilerDriver.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ class IDEDecompilerDriver(val settings: List[String]) extends dotc.Driver {
3535
run.printSummary()
3636
val unit = ctx.run.units.head
3737

38-
val decompiled = new ReflectionImpl(ctx).showSourceCode.showTree(unit.tpdTree)
38+
val refl = ReflectionImpl(ctx)
39+
val decompiled = new refl.SourceCodePrinter().showTree(unit.tpdTree)
3940
val tree = new TastyHTMLPrinter(unit.pickled.head._2).printContents()
4041

4142
reporter.removeBufferedMessages.foreach(message => System.err.println(message))

compiler/src/dotty/tools/dotc/quoted/QuoteDriver.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ class QuoteDriver extends Driver {
4747
val tree1 =
4848
if (ctx.settings.YshowRawQuoteTrees.value) tree
4949
else (new TreeCleaner).transform(tree)
50-
new ReflectionImpl(ctx).showSourceCode.showTree(tree1)
50+
val refl = ReflectionImpl(ctx)
51+
new refl.SourceCodePrinter().showTree(tree1)
5152
}
5253
withTree(expr, show, settings)
5354
}

compiler/src/dotty/tools/dotc/tastyreflect/CaseDefOpsImpl.scala

Lines changed: 0 additions & 37 deletions
This file was deleted.

compiler/src/dotty/tools/dotc/tastyreflect/CommentOpsImpl.scala

Lines changed: 0 additions & 10 deletions
This file was deleted.

compiler/src/dotty/tools/dotc/tastyreflect/ConstantOpsImpl.scala

Lines changed: 0 additions & 113 deletions
This file was deleted.

compiler/src/dotty/tools/dotc/tastyreflect/ContextOpsImpl.scala

Lines changed: 0 additions & 13 deletions
This file was deleted.

compiler/src/dotty/tools/dotc/tastyreflect/CoreImpl.scala

Lines changed: 0 additions & 132 deletions
This file was deleted.

0 commit comments

Comments
 (0)