Skip to content

Rename -Xlink-optimise to -Xlink #3513

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/config/ScalaSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class ScalaSettings extends Settings.SettingGroup {
val YoptPhases = PhasesSetting("-Yopt-phases", "Restrict the optimisation phases to execute under -optimise.")
val YoptFuel = IntSetting("-Yopt-fuel", "Maximum number of optimisations performed under -optimise.", -1)
val optimise = BooleanSetting("-optimise", "Generates faster bytecode by applying local optimisations to the .program") withAbbreviation "-optimize"
val XlinkOptimise = BooleanSetting("-Xlink-optimise", "Recompile library code with the application.").withAbbreviation("-Xlink-optimize")
val Xlink = BooleanSetting("-Xlink", "Recompile library code with the application.")

/** Dottydoc specific settings */
val siteRoot = StringSetting(
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ class ClassfileLoader(val classfile: AbstractFile) extends SymbolLoader {
}

private def mayLoadTreesFromTasty(implicit ctx: Context): Boolean =
ctx.settings.YretainTrees.value || ctx.settings.XlinkOptimise.value || ctx.settings.fromTasty.value
ctx.settings.YretainTrees.value || ctx.settings.Xlink.value || ctx.settings.fromTasty.value
}

class SourcefileLoader(val srcfile: AbstractFile) extends SymbolLoader {
Expand Down
4 changes: 2 additions & 2 deletions compiler/src/dotty/tools/dotc/transform/LinkAll.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class LinkAll extends Phase {
}
}

if (ctx.settings.XlinkOptimise.value) allUnits(Set.empty, units.toSet, Set.empty)
if (ctx.settings.Xlink.value) allUnits(Set.empty, units.toSet, Set.empty)
else units
}

Expand Down Expand Up @@ -67,7 +67,7 @@ class LinkAll extends Phase {
object LinkAll {

private[LinkAll] def loadCompilationUnit(clsd: ClassDenotation)(implicit ctx: Context): Option[CompilationUnit] = {
assert(ctx.settings.XlinkOptimise.value)
assert(ctx.settings.Xlink.value)
val tree = clsd.symbol.asClass.tree
if (tree.isEmpty) None
else {
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/dotty/tools/dotc/LinkTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class LinkTests extends ParallelTesting {

// Setup class paths
def mkLinkClassFlags(libPath: String) =
TestFlags(mkClassPath(libPath :: Jars.dottyTestDeps), mkClassPath(Jars.dottyTestDeps), basicDefaultOptions :+ "-Xlink-optimise")
TestFlags(mkClassPath(libPath :: Jars.dottyTestDeps), mkClassPath(Jars.dottyTestDeps), basicDefaultOptions :+ "-Xlink")
val strawmanClassPath = mkLinkClassFlags(defaultOutputDir + strawmanLibGroup + "/main/")
val customLibClassFlags = mkLinkClassFlags(defaultOutputDir + linkCustomLibGroup + "/custom-lib")

Expand Down