Skip to content

Commit 5d99e37

Browse files
committed
Remove -Xlink
This mode has not been tested for a while and is not going to be used in the future. It was the basis on which -from-tasty was created and tested the loading loading of TASTy trees before -from-tasty existed. It intended to use the linker call graph to know which classes to reload. Now that this is not going to be supported this infrastructure is useless.
1 parent 6485f89 commit 5d99e37

File tree

6 files changed

+3
-185
lines changed

6 files changed

+3
-185
lines changed

compiler/src/dotty/tools/dotc/Compiler.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ class Compiler {
5252
/** Phases dealing with TASTY tree pickling and unpickling */
5353
protected def picklerPhases: List[List[Phase]] =
5454
List(new Pickler) :: // Generate TASTY info
55-
List(new LinkAll) :: // Reload compilation units from TASTY for library code (if needed)
5655
List(new ReifyQuotes) :: // Turn quoted trees into explicit run-time data structures
5756
Nil
5857

compiler/src/dotty/tools/dotc/config/ScalaSettings.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,6 @@ class ScalaSettings extends Settings.SettingGroup {
144144
val YshowVarBounds = BooleanSetting("-Yshow-var-bounds", "Print type variables with their bounds")
145145
val YshowNoInline = BooleanSetting("-Yshow-no-inline", "Show inlined code without the 'inlined from' info")
146146

147-
/** Linker specific flags */
148-
val Xlink = BooleanSetting("-Xlink", "Recompile library code with the application.")
149147
val YnoDecodeStacktraces = BooleanSetting("-Yno-decode-stacktraces", "Show raw StackOverflow stacktraces, instead of decoding them into triggering operations.")
150148

151149
/** Dottydoc specific settings */

compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ class ClassfileLoader(val classfile: AbstractFile) extends SymbolLoader {
390390
}
391391

392392
private def mayLoadTreesFromTasty(implicit ctx: Context): Boolean =
393-
ctx.settings.YretainTrees.value || ctx.settings.Xlink.value || ctx.settings.fromTasty.value
393+
ctx.settings.YretainTrees.value || ctx.settings.fromTasty.value
394394
}
395395

396396
class SourcefileLoader(val srcfile: AbstractFile) extends SymbolLoader {

compiler/src/dotty/tools/dotc/core/Symbols.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -668,10 +668,8 @@ object Symbols {
668668

669669
private[this] var myTree: TreeOrProvider = tpd.EmptyTree
670670

671-
/** If this is either:
672-
* - a top-level class and `-Yretain-trees` is set
673-
* - a top-level class loaded from TASTY and `-tasty` or `-Xlink` is set
674-
* then return the TypeDef tree (possibly wrapped inside PackageDefs) for this class, otherwise EmptyTree.
671+
/** If this is a top-level class and `-Yretain-trees` (or `-from-tasty`) is set.
672+
* Returns the TypeDef tree (possibly wrapped inside PackageDefs) for this class, otherwise EmptyTree.
675673
* This will force the info of the class.
676674
*/
677675
def tree(implicit ctx: Context): Tree = treeContaining("")

compiler/src/dotty/tools/dotc/transform/LinkAll.scala

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

compiler/test/dotty/tools/dotc/LinkTests.scala

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

0 commit comments

Comments
 (0)