diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/actors/scala/actors/CanReply.scala | 10 | ||||
-rw-r--r-- | src/actors/scala/actors/OutputChannel.scala | 8 | ||||
-rw-r--r-- | src/library/scala/annotation/unique/package.scala | 41 | ||||
-rw-r--r-- | src/library/scala/annotation/unique/peer.scala | 18 | ||||
-rw-r--r-- | src/library/scala/annotation/unique/transient.scala | 19 | ||||
-rw-r--r-- | src/library/scala/annotation/unique/unique.scala | 17 |
6 files changed, 7 insertions, 106 deletions
diff --git a/src/actors/scala/actors/CanReply.scala b/src/actors/scala/actors/CanReply.scala index a4619a986e..de2c91d747 100644 --- a/src/actors/scala/actors/CanReply.scala +++ b/src/actors/scala/actors/CanReply.scala @@ -9,8 +9,6 @@ package scala.actors -import scala.annotation.unique.unique - /** * Defines result-bearing message send operations. * @@ -29,7 +27,7 @@ trait CanReply[-T, +R] { * @param msg the message to be sent * @return the reply */ - def !?(msg: T @unique): R + def !?(msg: T): R /** * Sends <code>msg</code> to this $actor and @@ -41,7 +39,7 @@ trait CanReply[-T, +R] { * @return <code>None</code> in case of timeout, otherwise * <code>Some(x)</code> where <code>x</code> is the reply */ - def !?(msec: Long, msg: T @unique): Option[R] + def !?(msec: Long, msg: T): Option[R] /** * Sends <code>msg</code> to this $actor and @@ -50,7 +48,7 @@ trait CanReply[-T, +R] { * @param msg the message to be sent * @return the future */ - def !!(msg: T @unique): Future[R] + def !!(msg: T): Future[R] /** * Sends <code>msg</code> to this $actor and @@ -63,6 +61,6 @@ trait CanReply[-T, +R] { * @param handler the function to be applied to the response * @return the future */ - def !![P](msg: T @unique, handler: PartialFunction[R, P]): Future[P] + def !![P](msg: T, handler: PartialFunction[R, P]): Future[P] } diff --git a/src/actors/scala/actors/OutputChannel.scala b/src/actors/scala/actors/OutputChannel.scala index d68e49a1b1..35a95c3762 100644 --- a/src/actors/scala/actors/OutputChannel.scala +++ b/src/actors/scala/actors/OutputChannel.scala @@ -9,8 +9,6 @@ package scala.actors -import scala.annotation.unique.unique - /** * A common interface for all channels to which values can be sent. * @@ -25,7 +23,7 @@ trait OutputChannel[-Msg] { * * @param msg the message to send */ - def !(msg: Msg @unique): Unit + def !(msg: Msg): Unit /** * Sends <code>msg</code> to this $actor (asynchronous) supplying @@ -34,14 +32,14 @@ trait OutputChannel[-Msg] { * @param msg the message to send * @param replyTo the reply destination */ - def send(msg: Msg @unique, replyTo: OutputChannel[Any]): Unit + def send(msg: Msg, replyTo: OutputChannel[Any]): Unit /** * Forwards <code>msg</code> to this $actor (asynchronous). * * @param msg the message to forward */ - def forward(msg: Msg @unique): Unit + def forward(msg: Msg): Unit /** * Returns the <code>Actor</code> that is receiving from this $actor. diff --git a/src/library/scala/annotation/unique/package.scala b/src/library/scala/annotation/unique/package.scala deleted file mode 100644 index 1cb652a084..0000000000 --- a/src/library/scala/annotation/unique/package.scala +++ /dev/null @@ -1,41 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -package scala.annotation - -/** - * An object that provides methods for capturing unique references, and - * for accessing unique fields. - * - * @author Philipp Haller - * @since 2.9 - */ -package object unique { - - trait Captured[A] { - def captured: A - def capturedBy[B](other: B): A = captured - } - - implicit def mkCaptured[A](x: A) = new Captured[A] { - def captured: A = x - } - - /* Swaps an object stored in a unique field with another unique object. - * - * The unique object that is the new value of the unique field becomes - * unusable by the caller. - * - * @param to the unique field that is the target of the swap - * @param from the unique object that is moved into the unique field - * @return the unique object that was the value of the unique - * field before the swap - */ - def swap[A, B <: A](to: A, from: B): A = to - -} diff --git a/src/library/scala/annotation/unique/peer.scala b/src/library/scala/annotation/unique/peer.scala deleted file mode 100644 index 72e41a18af..0000000000 --- a/src/library/scala/annotation/unique/peer.scala +++ /dev/null @@ -1,18 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -package scala.annotation.unique - -/** - * An annotation that indicates that the annotated parameter is in the - * same region as the parameter that is the argument of the annotation. - * - * @author Philipp Haller - * @since 2.9 - */ -final class peer(x: AnyRef) extends annotation.StaticAnnotation diff --git a/src/library/scala/annotation/unique/transient.scala b/src/library/scala/annotation/unique/transient.scala deleted file mode 100644 index 48301bfd5d..0000000000 --- a/src/library/scala/annotation/unique/transient.scala +++ /dev/null @@ -1,19 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -package scala.annotation.unique - -/** - * An annotation that indicates that the annotated parameter is transient. - * A transient parameter is borrowed in the sense that it is unique but it - * cannot be consumed. - * - * @author Philipp Haller - * @since 2.9 - */ -final class transient extends annotation.StaticAnnotation diff --git a/src/library/scala/annotation/unique/unique.scala b/src/library/scala/annotation/unique/unique.scala deleted file mode 100644 index 62ca474178..0000000000 --- a/src/library/scala/annotation/unique/unique.scala +++ /dev/null @@ -1,17 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -package scala.annotation.unique - -/** - * An annotation that indicates that the annotated parameter or field is unique. - * - * @author Philipp Haller - * @since 2.9 - */ -final class unique extends annotation.StaticAnnotation |