diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2016-02-15 16:56:48 +0100 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2016-02-16 16:43:34 +0100 |
commit | b7626d998ee415271105450f125c507629b8eae2 (patch) | |
tree | fd201d898e7d67dbdabdd116f1f27710718b98d6 /src/compiler/scala/tools/nsc/transform/CleanUp.scala | |
parent | ce3a8030fa59e5a9082528bf6f1ffc12a9277bc9 (diff) | |
download | scala-b7626d998ee415271105450f125c507629b8eae2.tar.gz scala-b7626d998ee415271105450f125c507629b8eae2.tar.bz2 scala-b7626d998ee415271105450f125c507629b8eae2.zip |
Remove -Y settings that are no longer used in 2.12
Added a deprecation warning for `-optimize`.
Later we'll also graduate `-Yopt` to `-opt`, probably for 2.12.0-M5.
Diffstat (limited to 'src/compiler/scala/tools/nsc/transform/CleanUp.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/CleanUp.scala | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/CleanUp.scala b/src/compiler/scala/tools/nsc/transform/CleanUp.scala index 112dedce81..0fb6213d36 100644 --- a/src/compiler/scala/tools/nsc/transform/CleanUp.scala +++ b/src/compiler/scala/tools/nsc/transform/CleanUp.scala @@ -21,16 +21,8 @@ abstract class CleanUp extends Statics with Transform with ast.TreeDSL { val phaseName: String = "cleanup" /* used in GenBCode: collects ClassDef symbols owning a main(Array[String]) method */ - private var entryPoints: List[Symbol] = null - def getEntryPoints: List[Symbol] = { - assert(settings.isBCodeActive, "Candidate Java entry points are collected here only when GenBCode in use.") - entryPoints sortBy ("" + _.fullName) // For predictably ordered error messages. - } - - override def newPhase(prev: scala.tools.nsc.Phase): StdPhase = { - entryPoints = if (settings.isBCodeActive) Nil else null; - super.newPhase(prev) - } + private var entryPoints: List[Symbol] = Nil + def getEntryPoints: List[Symbol] = entryPoints sortBy ("" + _.fullName) // For predictably ordered error messages. protected def newTransformer(unit: CompilationUnit): Transformer = new CleanUpTransformer(unit) @@ -378,11 +370,7 @@ abstract class CleanUp extends Statics with Transform with ast.TreeDSL { } override def transform(tree: Tree): Tree = tree match { - - case _: ClassDef - if (entryPoints != null) && - genBCode.isJavaEntryPoint(tree.symbol, currentUnit) - => + case _: ClassDef if genBCode.isJavaEntryPoint(tree.symbol, currentUnit) => // collecting symbols for entry points here (as opposed to GenBCode where they are used) // has the advantage of saving an additional pass over all ClassDefs. entryPoints ::= tree.symbol |