diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2012-07-20 11:56:04 -0700 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2012-07-20 11:56:04 -0700 |
commit | b0742ebacb5fb5982baa1096ad12457d9b14124e (patch) | |
tree | bd6be721db18bdc30a86b7b7ebd5f5755e44809c | |
parent | b67828d03908a3b94ca42404355b28f0f999eb89 (diff) | |
parent | 444bba68cc59e032c7f57087979d0b757ab3e94f (diff) | |
download | scala-b0742ebacb5fb5982baa1096ad12457d9b14124e.tar.gz scala-b0742ebacb5fb5982baa1096ad12457d9b14124e.tar.bz2 scala-b0742ebacb5fb5982baa1096ad12457d9b14124e.zip |
Merge pull request #948 from gkossakowski/target-1.6
Deprecate all JVM 1.5 targets and make 1.6 default.
-rw-r--r-- | build.xml | 26 | ||||
-rw-r--r-- | src/compiler/scala/tools/ant/Scalac.scala | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/Global.scala | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/settings/StandardScalaSettings.scala | 4 | ||||
-rw-r--r-- | test/files/pos/t5957/T_1.scala | 6 |
6 files changed, 23 insertions, 19 deletions
@@ -499,7 +499,7 @@ LOCAL DEPENDENCY (Adapted ASM) destdir="${build-asm.dir}/classes" classpath="${build-asm.dir}/classes" includes="**/*.java" - target="1.5" source="1.5"> + target="1.6" source="1.5"> <compilerarg line="${javac.args} -XDignore.symbol.file"/> </javac> <touch file="${build-asm.dir}/asm.complete" verbose="no"/> @@ -540,7 +540,7 @@ LOCAL DEPENDENCY (FORKJOIN) classpath="${build-libs.dir}/classes/forkjoin" includes="**/*.java" debug="true" - target="1.5" source="1.5"> + target="1.6" source="1.5"> <compilerarg line="${javac.args} -XDignore.symbol.file"/> </javac> <touch file="${build-libs.dir}/forkjoin.complete" verbose="no"/> @@ -587,7 +587,7 @@ LOCAL DEPENDENCY (FJBG) classpath="${build-libs.dir}/classes/fjbg" includes="**/*.java" debug="true" - target="1.5" source="1.4"> + target="1.6" source="1.4"> <compilerarg line="${javac.args} -XDignore.symbol.file"/> </javac> <touch file="${build-libs.dir}/fjbg.complete" verbose="no"/> @@ -635,7 +635,7 @@ LOCAL REFERENCE BUILD (LOCKER) srcdir="${src.dir}/library" destdir="${build-locker.dir}/classes/library" includes="**/*.java" - target="1.5" source="1.5"> + target="1.6" source="1.5"> <compilerarg line="${javac.args} -XDignore.symbol.file"/> <classpath> <path refid="forkjoin.classpath"/> @@ -749,7 +749,7 @@ LOCAL REFERENCE BUILD (LOCKER) includes="**/*.java" excludes="**/tests/**" debug="true" - target="1.5" source="1.4"> + target="1.6" source="1.4"> <compilerarg line="${javac.args}"/> </javac> <scalacfork @@ -1009,7 +1009,7 @@ QUICK BUILD (QUICK) srcdir="${src.dir}/library" destdir="${build-quick.dir}/classes/library" includes="**/*.java" - target="1.5" source="1.5"> + target="1.6" source="1.5"> <compilerarg line="${javac.args} -XDignore.symbol.file"/> <classpath> <path refid="forkjoin.classpath"/> @@ -1020,7 +1020,7 @@ QUICK BUILD (QUICK) srcdir="${src.dir}/actors" destdir="${build-quick.dir}/classes/library" includes="**/*.java" - target="1.5" source="1.5"> + target="1.6" source="1.5"> <compilerarg line="${javac.args}"/> <classpath> <path refid="forkjoin.classpath"/> @@ -1145,7 +1145,7 @@ QUICK BUILD (QUICK) includes="**/*.java" excludes="**/tests/**" debug="true" - target="1.5" source="1.4"> + target="1.6" source="1.4"> <compilerarg line="${javac.args}"/> </javac> <scalacfork @@ -1349,7 +1349,7 @@ QUICK BUILD (QUICK) <javac srcdir="${src.dir}/partest" destdir="${build-quick.dir}/classes/partest" - target="1.5" source="1.5"> + target="1.6" source="1.5"> <classpath> <pathelement location="${build-quick.dir}/classes/library"/> <pathelement location="${build-quick.dir}/classes/reflect"/> @@ -1691,7 +1691,7 @@ BOOTSTRAPPING BUILD (STRAP) srcdir="${src.dir}/library" destdir="${build-strap.dir}/classes/library" includes="**/*.java" - target="1.5" source="1.5"> + target="1.6" source="1.5"> <compilerarg line="${javac.args} -XDignore.symbol.file"/> <classpath> <path refid="forkjoin.classpath"/> @@ -1702,7 +1702,7 @@ BOOTSTRAPPING BUILD (STRAP) srcdir="${src.dir}/actors" destdir="${build-strap.dir}/classes/library" includes="**/*.java" - target="1.5" source="1.5"> + target="1.6" source="1.5"> <compilerarg line="${javac.args}"/> <classpath> <path refid="forkjoin.classpath"/> @@ -1826,7 +1826,7 @@ BOOTSTRAPPING BUILD (STRAP) includes="**/*.java" excludes="**/tests/**" debug="true" - target="1.5" source="1.4"> + target="1.6" source="1.4"> <compilerarg line="${javac.args}"/> </javac> <scalacfork @@ -1994,7 +1994,7 @@ BOOTSTRAPPING BUILD (STRAP) <javac srcdir="${src.dir}/partest" destdir="${build-strap.dir}/classes/partest" - target="1.5" source="1.5"> + target="1.6" source="1.5"> <classpath> <pathelement location="${build-strap.dir}/classes/library"/> <pathelement location="${build-strap.dir}/classes/reflect"/> diff --git a/src/compiler/scala/tools/ant/Scalac.scala b/src/compiler/scala/tools/ant/Scalac.scala index e70716885e..c6809fb48e 100644 --- a/src/compiler/scala/tools/ant/Scalac.scala +++ b/src/compiler/scala/tools/ant/Scalac.scala @@ -99,7 +99,7 @@ class Scalac extends ScalaMatchingTask with ScalacShared { /** Defines valid values for the `target` property. */ object Target extends PermissibleValue { - val values = List("jvm-1.5", "jvm-1.6", "jvm-1.7", "msil") + val values = List("jvm-1.5", "jvm-1.5-fjbg", "jvm-1.5-asm", "jvm-1.6", "jvm-1.7", "msil") } /** Defines valid values for the `deprecation` and `unchecked` properties. */ diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala index e378d71944..83335c4f62 100644 --- a/src/compiler/scala/tools/nsc/Global.scala +++ b/src/compiler/scala/tools/nsc/Global.scala @@ -1447,6 +1447,8 @@ class Global(var currentSettings: Settings, var reporter: Reporter) settings.userSetSettings filter (_.isDeprecated) foreach { s => unit.deprecationWarning(NoPosition, s.name + " is deprecated: " + s.deprecationMessage.get) } + if (settings.target.value.contains("jvm-1.5")) + unit.deprecationWarning(NoPosition, settings.target.name + ":" + settings.target.value + " is deprecated: use target for Java 1.6 or above.") } /* An iterator returning all the units being compiled in this run */ diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala index ade99267f8..759384d9ec 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala @@ -598,7 +598,7 @@ abstract class GenASM extends SubComponent with BytecodeWriters { reverseJavaName.put(internalName, trackedSym) case Some(oldsym) => assert((oldsym == trackedSym) || (oldsym == RuntimeNothingClass) || (oldsym == RuntimeNullClass), // In contrast, neither NothingClass nor NullClass show up bytecode-level. - "how can getCommonSuperclass() do its job if different class symbols get the same bytecode-level internal name.") + "how can getCommonSuperclass() do its job if different class symbols get the same bytecode-level internal name: " + internalName) } } diff --git a/src/compiler/scala/tools/nsc/settings/StandardScalaSettings.scala b/src/compiler/scala/tools/nsc/settings/StandardScalaSettings.scala index f0ee8b11f3..0991577829 100644 --- a/src/compiler/scala/tools/nsc/settings/StandardScalaSettings.scala +++ b/src/compiler/scala/tools/nsc/settings/StandardScalaSettings.scala @@ -40,9 +40,9 @@ trait StandardScalaSettings { val nowarn = BooleanSetting ("-nowarn", "Generate no warnings.") val optimise: BooleanSetting // depends on post hook which mutates other settings val print = BooleanSetting ("-print", "Print program with Scala-specific features removed.") - val target = ChoiceSetting ("-target", "target", "Target platform for object files.", + val target = ChoiceSetting ("-target", "target", "Target platform for object files. All JVM 1.5 targets are deprecated.", List("jvm-1.5", "jvm-1.5-fjbg", "jvm-1.5-asm", "jvm-1.6", "jvm-1.7", "msil"), - "jvm-1.5-asm") + "jvm-1.6") val unchecked = BooleanSetting ("-unchecked", "Enable detailed unchecked (erasure) warnings.") val uniqid = BooleanSetting ("-uniqid", "Uniquely tag all identifiers in debugging output.") val usejavacp = BooleanSetting ("-usejavacp", "Utilize the java.class.path in classpath resolution.") diff --git a/test/files/pos/t5957/T_1.scala b/test/files/pos/t5957/T_1.scala index 1db5a3891f..339dcbf0f0 100644 --- a/test/files/pos/t5957/T_1.scala +++ b/test/files/pos/t5957/T_1.scala @@ -1,6 +1,8 @@ abstract class T { - def t1: Test$Bar + // see: SI-6109 + // def t1: Test$Bar def t2: Test#Bar - def t3: Test$Baz + // see: SI-6109 + // def t3: Test$Baz def t4: Test.Baz } |