summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.xml180
-rw-r--r--lib/sabbus.jar.desired.sha11
-rw-r--r--lib/scala-compiler.jar.desired.sha12
-rw-r--r--lib/scala-library-src.jar.desired.sha12
-rw-r--r--lib/scala-library.jar.desired.sha12
-rw-r--r--src/compiler/scala/tools/ant/sabbus/Make.scala73
-rw-r--r--src/compiler/scala/tools/ant/sabbus/ScalacFork.scala76
-rw-r--r--src/compiler/scala/tools/ant/sabbus/TaskArgs.scala77
-rw-r--r--src/compiler/scala/tools/ant/sabbus/antlib.xml2
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala13
-rw-r--r--src/library/scala/SerialVersionUID.scala2
-rw-r--r--src/library/scala/cloneable.scala2
-rw-r--r--src/library/scala/reflect/BeanProperty.scala2
-rw-r--r--src/library/scala/serializable.scala2
14 files changed, 258 insertions, 178 deletions
diff --git a/build.xml b/build.xml
index b11de0e15f..5fce3159f7 100644
--- a/build.xml
+++ b/build.xml
@@ -104,9 +104,12 @@ PROPERTIES
<property name="copyright.string" value="Copyright 2002-2008, LAMP/EPFL"/>
- <!-- These are NOT the flags used to run SuperSabbus -->
+ <!-- These are NOT the flags used to run SuperSabbus, but the ones written
+ into the script runners created with scala.tools.ant.ScalaTool -->
<property name="java.flags" value="-Xmx256M -Xms32M"/>
+ <property name="scalacfork.maxmemory" value="512m"/>
+
<!-- ===========================================================================
INITIALISATION
============================================================================ -->
@@ -144,7 +147,6 @@ INITIALISATION
<path id="starr.classpath">
<pathelement location="${lib.starr.jar}"/>
<pathelement location="${comp.starr.jar}"/>
- <pathelement location="${lib.dir}/sabbus.jar"/>
<pathelement location="${fjbg.jar}"/>
<pathelement location="${ant.jar}"/>
</path>
@@ -176,25 +178,33 @@ LOCAL REFERENCE BUILD (LOCKER)
classpath="${build-locker.dir}/classes/library"
includes="**/*.java"
target="1.5" source="1.5">
- <compilerarg line="${javac.args}"/>
+ <compilerarg line="${javac.args}"/>
</javac>
- <sabmake id="starr.lib.scalac"
+ <scalacfork
destdir="${build-locker.dir}/classes/library"
compilerpathref="starr.classpath"
srcpath="${src.dir}/library"
- target="jvm-1.5"
- params="${scalac.args}">
+ params="${scalac.args}"
+ srcdir="${src.dir}/library"
+ maxmemory="${scalacfork.maxmemory}">
+ <include name="scala/Predef.scala"/>
<compilationpath>
- <pathelement location="${build-locker.dir}/classes/library"/>
+ <pathelement location="${build-locker.dir}/classes/library"/>
</compilationpath>
- </sabmake>
- <sabuse id="starr.lib.scalac" srcdir="${src.dir}/library">
- <include name="scala/Predef.scala"/>
- </sabuse>
- <sabuse id="starr.lib.scalac" srcdir="${src.dir}/library">
+ </scalacfork>
+ <scalacfork
+ destdir="${build-locker.dir}/classes/library"
+ compilerpathref="starr.classpath"
+ srcpath="${src.dir}/library"
+ params="${scalac.args}"
+ srcdir="${src.dir}/library"
+ maxmemory="${scalacfork.maxmemory}">
<include name="**/*.scala"/>
<exclude name="scala/Predef.scala"/>
- </sabuse>
+ <compilationpath>
+ <pathelement location="${build-locker.dir}/classes/library"/>
+ </compilationpath>
+ </scalacfork>
<propertyfile file="${build-locker.dir}/classes/library/library.properties">
<entry key="version.number" value="${version.number}"/>
<entry key="copyright.string" value="${copyright.string}"/>
@@ -207,7 +217,6 @@ LOCAL REFERENCE BUILD (LOCKER)
<include name="**/*.css"/>
</fileset>
</copy>
- <sabbreak id="starr.lib.scalac"/>
<touch file="${build-locker.dir}/library.complete" verbose="no"/>
<stopwatch name="locker.lib.timer" action="total"/>
</target>
@@ -221,12 +230,14 @@ LOCAL REFERENCE BUILD (LOCKER)
<target name="locker.comp" depends="locker.pre-comp" if="locker.comp.needed">
<stopwatch name="locker.comp.timer"/>
<mkdir dir="${build-locker.dir}/classes/compiler"/>
- <sabmake id="starr.comp.scalac"
+ <scalacfork
destdir="${build-locker.dir}/classes/compiler"
compilerpathref="starr.classpath"
srcpath="${src.dir}/compiler"
- target="jvm-1.5"
- params="${scalac.args}">
+ params="${scalac.args}"
+ srcdir="${src.dir}/compiler"
+ maxmemory="${scalacfork.maxmemory}">
+ <include name="**/*.scala"/>
<compilationpath>
<pathelement location="${build-locker.dir}/classes/library"/>
<pathelement location="${build-locker.dir}/classes/compiler"/>
@@ -235,10 +246,7 @@ LOCAL REFERENCE BUILD (LOCKER)
<pathelement location="${jline.jar}"/>
<pathelement location="${ant.jar}"/>
</compilationpath>
- </sabmake>
- <sabuse id="starr.comp.scalac" srcdir="${src.dir}/compiler">
- <include name="**/*.scala"/>
- </sabuse>
+ </scalacfork>
<propertyfile file="${build-locker.dir}/classes/compiler/compiler.properties">
<entry key="version.number" value="${version.number}"/>
<entry key="copyright.string" value="${copyright.string}"/>
@@ -251,7 +259,6 @@ LOCAL REFERENCE BUILD (LOCKER)
<include name="**/*.css"/>
</fileset>
</copy>
- <sabbreak id="starr.comp.scalac"/>
<touch file="${build-locker.dir}/compiler.complete" verbose="no"/>
<stopwatch name="locker.comp.timer" action="total"/>
</target>
@@ -311,44 +318,67 @@ QUICK BUILD (QUICK)
target="1.5" source="1.5">
<compilerarg line="${javac.args}"/>
</javac>
- <sabmake id="locker.lib.scalac"
+ <scalacfork
destdir="${build-quick.dir}/classes/library"
compilerpathref="locker.classpath"
srcpath="${src.dir}/library"
- target="jvm-1.5"
- params="${scalac.args}">
+ params="${scalac.args}"
+ srcdir="${src.dir}/library"
+ maxmemory="${scalacfork.maxmemory}">
+ <include name="scala/Predef.scala"/>
<compilationpath>
<pathelement location="${build-quick.dir}/classes/library"/>
</compilationpath>
- </sabmake>
- <sabuse id="locker.lib.scalac" srcdir="${src.dir}/library">
- <include name="scala/Predef.scala"/>
- </sabuse>
- <!-- re-instantiate locker.lib.scalac because keeping the same instance will lead to some attributes missing -->
- <sabbreak id="locker.lib.scalac"/>
- <sabmake id="locker.lib.scalac"
+ </scalacfork>
+ <scalacfork
destdir="${build-quick.dir}/classes/library"
compilerpathref="locker.classpath"
srcpath="${src.dir}/library"
- target="jvm-1.5"
- params="${scalac.args}">
+ params="${scalac.args}"
+ srcdir="${src.dir}/library"
+ maxmemory="${scalacfork.maxmemory}">
+ <include name="**/*.scala"/>
+ <exclude name="scala/Predef.scala"/>
<compilationpath>
<pathelement location="${build-quick.dir}/classes/library"/>
</compilationpath>
- </sabmake>
- <sabuse id="locker.lib.scalac" srcdir="${src.dir}/library">
- <include name="**/*.scala"/>
- <exclude name="scala/Predef.scala"/>
- </sabuse>
- <sabuse id="locker.lib.scalac" srcdir="${src.dir}/actors">
+ </scalacfork>
+ <scalacfork
+ destdir="${build-quick.dir}/classes/library"
+ compilerpathref="locker.classpath"
+ srcpath="${src.dir}/library"
+ params="${scalac.args}"
+ srcdir="${src.dir}/actors"
+ maxmemory="${scalacfork.maxmemory}">
<include name="**/*.scala"/>
- </sabuse>
- <sabuse id="locker.lib.scalac" srcdir="${src.dir}/dbc">
+ <compilationpath>
+ <pathelement location="${build-quick.dir}/classes/library"/>
+ </compilationpath>
+ </scalacfork>
+ <scalacfork
+ destdir="${build-quick.dir}/classes/library"
+ compilerpathref="locker.classpath"
+ srcpath="${src.dir}/library"
+ params="${scalac.args}"
+ srcdir="${src.dir}/dbc"
+ maxmemory="${scalacfork.maxmemory}">
<include name="**/*.scala"/>
- </sabuse>
- <sabuse id="locker.lib.scalac" srcdir="${src.dir}/swing">
+ <compilationpath>
+ <pathelement location="${build-quick.dir}/classes/library"/>
+ </compilationpath>
+ </scalacfork>
+ <scalacfork
+ destdir="${build-quick.dir}/classes/library"
+ compilerpathref="locker.classpath"
+ srcpath="${src.dir}/library"
+ params="${scalac.args}"
+ srcdir="${src.dir}/swing"
+ maxmemory="${scalacfork.maxmemory}">
<include name="**/*.scala"/>
- </sabuse>
+ <compilationpath>
+ <pathelement location="${build-quick.dir}/classes/library"/>
+ </compilationpath>
+ </scalacfork>
<propertyfile file="${build-quick.dir}/classes/library/library.properties">
<entry key="version.number" value="${version.number}"/>
<entry key="copyright.string" value="${copyright.string}"/>
@@ -361,7 +391,6 @@ QUICK BUILD (QUICK)
<include name="**/*.css"/>
</fileset>
</copy>
- <sabbreak id="locker.lib.scalac"/>
<touch file="${build-quick.dir}/library.complete" verbose="no"/>
<stopwatch name="quick.lib.timer" action="total"/>
</target>
@@ -375,12 +404,14 @@ QUICK BUILD (QUICK)
<target name="quick.comp" depends="quick.pre-comp" unless="quick.comp.available">
<stopwatch name="quick.comp.timer"/>
<mkdir dir="${build-quick.dir}/classes/compiler"/>
- <sabmake id="locker.comp.scalac"
+ <scalacfork
destdir="${build-quick.dir}/classes/compiler"
compilerpathref="locker.classpath"
srcpath="${src.dir}/compiler"
- target="jvm-1.5"
- params="${scalac.args}">
+ params="${scalac.args}"
+ srcdir="${src.dir}/compiler"
+ maxmemory="${scalacfork.maxmemory}">
+ <include name="**/*.scala"/>
<compilationpath>
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${build-quick.dir}/classes/compiler"/>
@@ -389,10 +420,7 @@ QUICK BUILD (QUICK)
<pathelement location="${jline.jar}"/>
<pathelement location="${ant.jar}"/>
</compilationpath>
- </sabmake>
- <sabuse id="locker.comp.scalac" srcdir="${src.dir}/compiler">
- <include name="**/*.scala"/>
- </sabuse>
+ </scalacfork>
<propertyfile file="${build-quick.dir}/classes/compiler/compiler.properties">
<entry key="version.number" value="${version.number}"/>
<entry key="copyright.string" value="${copyright.string}"/>
@@ -405,7 +433,6 @@ QUICK BUILD (QUICK)
<include name="**/*.css"/>
</fileset>
</copy>
- <sabbreak id="locker.comp.scalac"/>
<touch file="${build-quick.dir}/compiler.complete" verbose="no"/>
<stopwatch name="quick.comp.timer" action="total"/>
</target>
@@ -431,28 +458,26 @@ QUICK BUILD (QUICK)
<include name="**/*.java"/>
<compilerarg line="${javac.args}"/>
</javac>
- <sabmake id="locker.partest.scalac"
+ <scalacfork
destdir="${build-quick.dir}/classes/partest"
compilerpathref="locker.classpath"
srcpath="${src.dir}/partest"
- target="jvm-1.5"
- params="${scalac.args}">
+ params="${scalac.args}"
+ srcdir="${src.dir}/partest"
+ maxmemory="${scalacfork.maxmemory}">
+ <include name="**/*.scala"/>
<compilationpath>
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${build-quick.dir}/classes/compiler"/>
<pathelement location="${build-quick.dir}/classes/partest"/>
<pathelement location="${ant.jar}"/>
</compilationpath>
- </sabmake>
- <sabuse id="locker.partest.scalac" srcdir="${src.dir}/partest">
- <include name="**/*.scala"/>
- </sabuse>
+ </scalacfork>
<copy todir="${build-quick.dir}/classes/partest">
<fileset dir="${src.dir}/partest">
<include name="**/*.xml"/>
</fileset>
</copy>
- <sabbreak id="locker.partest.scalac"/>
<touch file="${build-quick.dir}/partest.complete" verbose="no"/>
<stopwatch name="quick.partest.timer" action="total"/>
</target>
@@ -1211,35 +1236,4 @@ MISCELLANEOUS
<target name="graph.sabbus" depends="graph.init">
<vizant antfile="${ant.file}" outfile="${ant.project.name}.dot"/>
</target>
-
-<!-- ===========================================================================
-MAKE SABBUS JAR (to remove once sabbus is part of starr library)
-============================================================================ -->
-
- <target name="sabbus.start" depends="init"/>
-
- <target name="sabbus.build" depends="sabbus.start">
- <taskdef resource="scala/tools/ant/antlib.xml" classpathref="starr.classpath"/>
- <mkdir dir="${build.dir}/sabbus"/>
- <scalac
- srcdir="${src.dir}/compiler/scala/tools/ant/sabbus/"
- destdir="${build.dir}/sabbus"
- target="jvm-1.5">
- <include name="*.scala"/>
- <classpath>
- <pathelement location="${lib.starr.jar}"/>
- <pathelement location="${comp.starr.jar}"/>
- <pathelement location="${ant.jar}"/>
- </classpath>
- </scalac>
- <copy
- file="${src.dir}/compiler/scala/tools/ant/sabbus/antlib.xml"
- todir="${build.dir}/sabbus/scala/tools/ant/sabbus"/>
- <jar
- destfile="${lib.dir}/sabbus.jar"
- basedir="${build.dir}/sabbus"/>
- </target>
-
- <target name="sabbus.done" depends="sabbus.build"/>
-
</project>
diff --git a/lib/sabbus.jar.desired.sha1 b/lib/sabbus.jar.desired.sha1
deleted file mode 100644
index e2047964f2..0000000000
--- a/lib/sabbus.jar.desired.sha1
+++ /dev/null
@@ -1 +0,0 @@
-7c49b10e4b8439feba2965a1c725b6597d4005cb ?sabbus.jar
diff --git a/lib/scala-compiler.jar.desired.sha1 b/lib/scala-compiler.jar.desired.sha1
index 6c93c86f22..a06f91c02a 100644
--- a/lib/scala-compiler.jar.desired.sha1
+++ b/lib/scala-compiler.jar.desired.sha1
@@ -1 +1 @@
-a8a19f44968d5c139ceaff5c2c774604a903dbc8 ?scala-compiler.jar
+c09dfb942db8d2cee253f79a32a366cad571a66d ?scala-compiler.jar
diff --git a/lib/scala-library-src.jar.desired.sha1 b/lib/scala-library-src.jar.desired.sha1
index 930a5b70f5..7438be3512 100644
--- a/lib/scala-library-src.jar.desired.sha1
+++ b/lib/scala-library-src.jar.desired.sha1
@@ -1 +1 @@
-81eaf4de65d354d1951387a2cb42abfca0630a1d ?scala-library-src.jar
+1c2800aa32bf3a63e0e285858b540ecd72b08bb0 ?scala-library-src.jar
diff --git a/lib/scala-library.jar.desired.sha1 b/lib/scala-library.jar.desired.sha1
index 1248cae5bc..6ba2d43ca6 100644
--- a/lib/scala-library.jar.desired.sha1
+++ b/lib/scala-library.jar.desired.sha1
@@ -1 +1 @@
-195bfeb2642116ec5fa3b01360761f9080b3d6f0 ?scala-library.jar
+c255eb54415e5778a3e84717dde7dde6ec405035 ?scala-library.jar
diff --git a/src/compiler/scala/tools/ant/sabbus/Make.scala b/src/compiler/scala/tools/ant/sabbus/Make.scala
index 21ac55ceb9..958793423d 100644
--- a/src/compiler/scala/tools/ant/sabbus/Make.scala
+++ b/src/compiler/scala/tools/ant/sabbus/Make.scala
@@ -13,77 +13,7 @@ import java.io.File
import org.apache.tools.ant.Task
import org.apache.tools.ant.types.{Path, Reference}
-class Make extends Task {
-
- def setId(input: String): Unit = {
- id = Some(input)
- }
-
- def setParams(input: String): Unit = {
- params = params match {
- case None => Some(input)
- case Some(ps) => Some(ps + " " + input)
- }
- }
-
- def setTarget(input: String): Unit = {
- compTarget = Some(input)
- }
-
- def setCompilationPath(input: Path): Unit = {
- if (compilationPath.isEmpty) compilationPath = Some(input)
- else compilationPath.get.append(input)
- }
-
- def createCompilationPath: Path = {
- if (compilationPath.isEmpty) compilationPath = Some(new Path(getProject()))
- compilationPath.get.createPath()
- }
-
- def setCompilationPathRef(input: Reference): Unit = {
- createCompilationPath.setRefid(input)
- }
-
- def setSrcPath(input: Path): Unit = {
- if (sourcePath.isEmpty) sourcePath = Some(input)
- else sourcePath.get.append(input)
- }
-
- def createSrcPath: Path = {
- if (sourcePath.isEmpty) sourcePath = Some(new Path(getProject()))
- sourcePath.get.createPath()
- }
-
- def setSrcPathRef(input: Reference): Unit = {
- createSrcPath.setRefid(input)
- }
-
- def setCompilerPath(input: Path): Unit = {
- if (compilerPath.isEmpty) compilerPath = Some(input)
- else compilerPath.get.append(input)
- }
-
- def createCompilerPath: Path = {
- if (compilerPath.isEmpty) compilerPath = Some(new Path(getProject()))
- compilerPath.get.createPath()
- }
-
- def setCompilerPathRef(input: Reference): Unit = {
- createCompilerPath.setRefid(input)
- }
-
- def setDestdir(input: File): Unit = {
- destinationDir = Some(input)
- }
-
- private var id: Option[String] = None
- private var params: Option[String] = None
- private var compTarget: Option[String] = None
- private var compilationPath: Option[Path] = None
- private var sourcePath: Option[Path] = None
- private var compilerPath: Option[Path] = None
- private var destinationDir: Option[File] = None
-
+class Make extends Task with TaskArgs {
override def execute: Unit = {
if (id.isEmpty) error("Mandatory attribute 'id' is not set.")
if (compilerPath.isEmpty) error("Mandatory attribute 'compilerpath' is not set.")
@@ -95,5 +25,4 @@ class Make extends Task {
if (!params.isEmpty) settings.more = params.get
Compilers.make(id.get, (compilerPath.get.list.map{ path => new File(path).toURL }), settings)
}
-
}
diff --git a/src/compiler/scala/tools/ant/sabbus/ScalacFork.scala b/src/compiler/scala/tools/ant/sabbus/ScalacFork.scala
new file mode 100644
index 0000000000..74928ec7ce
--- /dev/null
+++ b/src/compiler/scala/tools/ant/sabbus/ScalacFork.scala
@@ -0,0 +1,76 @@
+package scala.tools.ant.sabbus
+
+import java.io.File;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.{MatchingTask, Java}
+import org.apache.tools.ant.util.{GlobPatternMapper, SourceFileScanner}
+
+class ScalacFork extends MatchingTask with TaskArgs {
+ def setSrcdir(input: File) {
+ sourceDir = Some(input)
+ }
+
+ def setFailOnError(input: Boolean): Unit = {
+ failOnError = input
+ }
+
+ def setTimeout(input: Long): Unit = {
+ timeout = Some(input)
+ }
+
+ def setMaxMemory(input: String): Unit = {
+ maxmemory = Some(input)
+ }
+
+ private var sourceDir: Option[File] = None
+ private var failOnError: Boolean = true
+ private var timeout: Option[Long] = None
+ private var maxmemory: Option[String] = None
+
+ override def execute() {
+ if (compilerPath.isEmpty) error("Mandatory attribute 'compilerpath' is not set.")
+ if (sourceDir.isEmpty) error("Mandatory attribute 'srcdir' is not set.")
+ if (destinationDir.isEmpty) error("Mandatory attribute 'destdir' is not set.")
+
+ val settings = new Settings
+ settings.d = destinationDir.get
+ if (!compTarget.isEmpty) settings.target = compTarget.get
+ if (!compilationPath.isEmpty) settings.classpath = compilationPath.get
+ if (!sourcePath.isEmpty) settings.sourcepath = sourcePath.get
+ if (!params.isEmpty) settings.more = params.get
+
+ // not yet used: compilerPath, sourcedir (used in mapper), failonerror, timeout
+
+ val mapper = new GlobPatternMapper()
+ mapper.setTo("*.class")
+ mapper.setFrom("*.scala")
+ val includedFiles: Array[File] =
+ new SourceFileScanner(this).restrict(
+ getDirectoryScanner(sourceDir.get).getIncludedFiles,
+ sourceDir.get,
+ destinationDir.get,
+ mapper
+ ) map (new File(sourceDir.get, _))
+ if (includedFiles.size > 0) {
+ log("Compiling "+ includedFiles.size +" file"+
+ (if (includedFiles.size > 1) "s" else "") +" to "+ destinationDir.get)
+
+ val java = new Java(this) // set this as owner
+ java.setFork(true)
+ java.setClasspath(compilerPath.get)
+ java.setClassname("scala.tools.nsc.Main")
+ if (!timeout.isEmpty) java.setTimeout(timeout.get)
+ if (!maxmemory.isEmpty) java.setMaxmemory(maxmemory.get)
+ for (arg <- settings.toArgs)
+ java.createArg().setValue(arg)
+ for (file <- includedFiles)
+ java.createArg().setFile(file)
+
+ log(java.getCommandLine.getCommandline.mkString("", " ", ""), Project.MSG_VERBOSE)
+ val res = java.executeJava()
+ if (failOnError && res != 0)
+ error("Compilation failed because of an internal compiler error;"+
+ " see the error output for details.")
+ }
+ }
+}
diff --git a/src/compiler/scala/tools/ant/sabbus/TaskArgs.scala b/src/compiler/scala/tools/ant/sabbus/TaskArgs.scala
new file mode 100644
index 0000000000..1ce89120c7
--- /dev/null
+++ b/src/compiler/scala/tools/ant/sabbus/TaskArgs.scala
@@ -0,0 +1,77 @@
+package scala.tools.ant.sabbus
+
+import java.io.File
+import org.apache.tools.ant.Task
+import org.apache.tools.ant.types.{Path, Reference}
+
+trait TaskArgs { this: Task =>
+
+ def setId(input: String): Unit = {
+ id = Some(input)
+ }
+
+ def setParams(input: String): Unit = {
+ params = params match {
+ case None => Some(input)
+ case Some(ps) => Some(ps + " " + input)
+ }
+ }
+
+ def setTarget(input: String): Unit = {
+ compTarget = Some(input)
+ }
+
+ def setCompilationPath(input: Path): Unit = {
+ if (compilationPath.isEmpty) compilationPath = Some(input)
+ else compilationPath.get.append(input)
+ }
+
+ def createCompilationPath: Path = {
+ if (compilationPath.isEmpty) compilationPath = Some(new Path(getProject()))
+ compilationPath.get.createPath()
+ }
+
+ def setCompilationPathRef(input: Reference): Unit = {
+ createCompilationPath.setRefid(input)
+ }
+
+ def setSrcPath(input: Path): Unit = {
+ if (sourcePath.isEmpty) sourcePath = Some(input)
+ else sourcePath.get.append(input)
+ }
+
+ def createSrcPath: Path = {
+ if (sourcePath.isEmpty) sourcePath = Some(new Path(getProject()))
+ sourcePath.get.createPath()
+ }
+
+ def setSrcPathRef(input: Reference): Unit = {
+ createSrcPath.setRefid(input)
+ }
+
+ def setCompilerPath(input: Path): Unit = {
+ if (compilerPath.isEmpty) compilerPath = Some(input)
+ else compilerPath.get.append(input)
+ }
+
+ def createCompilerPath: Path = {
+ if (compilerPath.isEmpty) compilerPath = Some(new Path(getProject()))
+ compilerPath.get.createPath()
+ }
+
+ def setCompilerPathRef(input: Reference): Unit = {
+ createCompilerPath.setRefid(input)
+ }
+
+ def setDestdir(input: File): Unit = {
+ destinationDir = Some(input)
+ }
+
+ protected var id: Option[String] = None
+ protected var params: Option[String] = None
+ protected var compTarget: Option[String] = None
+ protected var compilationPath: Option[Path] = None
+ protected var sourcePath: Option[Path] = None
+ protected var compilerPath: Option[Path] = None
+ protected var destinationDir: Option[File] = None
+}
diff --git a/src/compiler/scala/tools/ant/sabbus/antlib.xml b/src/compiler/scala/tools/ant/sabbus/antlib.xml
index 3388ee00f4..04cd1a8f59 100644
--- a/src/compiler/scala/tools/ant/sabbus/antlib.xml
+++ b/src/compiler/scala/tools/ant/sabbus/antlib.xml
@@ -5,4 +5,6 @@
classname="scala.tools.ant.sabbus.Use"/>
<taskdef name="sabbreak"
classname="scala.tools.ant.sabbus.Break"/>
+ <taskdef name="scalacfork"
+ classname="scala.tools.ant.sabbus.ScalacFork"/>
</antlib> \ No newline at end of file
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala b/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala
index 3f6448300a..c318c08ffb 100644
--- a/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala
+++ b/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala
@@ -417,11 +417,14 @@ abstract class Pickler extends SubComponent {
}
private def putAnnotation(sym: Symbol, annot: AnnotationInfo) {
- assert(putEntry((sym, annot)))
- val AnnotationInfo(atp, args, assocs) = annot
- putType(atp)
- args foreach putAnnotationArg
- for ((name, c) <- assocs) { putEntry(name); putAnnotationArg(c) }
+ // if an annotation with the same arguments is applied to the
+ // same symbol multiple times, it's only pickled once.
+ if (putEntry((sym, annot))) {
+ val AnnotationInfo(atp, args, assocs) = annot
+ putType(atp)
+ args foreach putAnnotationArg
+ for ((name, c) <- assocs) { putEntry(name); putAnnotationArg(c) }
+ }
}
private def putAnnotation(annot: AnnotationInfo) {
diff --git a/src/library/scala/SerialVersionUID.scala b/src/library/scala/SerialVersionUID.scala
index d75a65a065..34e94a5bb0 100644
--- a/src/library/scala/SerialVersionUID.scala
+++ b/src/library/scala/SerialVersionUID.scala
@@ -16,4 +16,4 @@ package scala
* Annotation for specifying the static SerialVersionUID field
* of a serializable class
*/
-class SerialVersionUID(uid: Long) extends Annotation
+class SerialVersionUID(uid: Long) extends StaticAnnotation
diff --git a/src/library/scala/cloneable.scala b/src/library/scala/cloneable.scala
index 7853f604be..1fd88e4765 100644
--- a/src/library/scala/cloneable.scala
+++ b/src/library/scala/cloneable.scala
@@ -14,4 +14,4 @@ package scala
/**
* An annotation that designates the class to which it is applied as cloneable
*/
-class cloneable extends Annotation
+class cloneable extends StaticAnnotation
diff --git a/src/library/scala/reflect/BeanProperty.scala b/src/library/scala/reflect/BeanProperty.scala
index 4a09578df9..88d17208a5 100644
--- a/src/library/scala/reflect/BeanProperty.scala
+++ b/src/library/scala/reflect/BeanProperty.scala
@@ -30,4 +30,4 @@ package scala.reflect
* you should use the normal Scala access and assignment.
* </p>
*/
-class BeanProperty extends Annotation
+class BeanProperty extends StaticAnnotation
diff --git a/src/library/scala/serializable.scala b/src/library/scala/serializable.scala
index f96c36a155..50f59928f6 100644
--- a/src/library/scala/serializable.scala
+++ b/src/library/scala/serializable.scala
@@ -15,4 +15,4 @@ package scala
/**
* An annotation that designates the class to which it is applied as serializable
*/
-class serializable extends Annotation {}
+class serializable extends StaticAnnotation {}