diff --git a/docs/examples/actors/Loop.scala b/docs/examples/actors/Loop.scala
index 0799996d8..a70554a50 100644
--- a/docs/examples/actors/Loop.scala
+++ b/docs/examples/actors/Loop.scala
@@ -14,7 +14,7 @@ object Loop extends Application {
}
}
- for (val i <- List.range(0, 10)) {
+ for (val i <- 0 until 10) {
a ! A
}
}
diff --git a/src/actors/scala/actors/Actor.scala b/src/actors/scala/actors/Actor.scala
index 873835d17..e0e60dadd 100644
--- a/src/actors/scala/actors/Actor.scala
+++ b/src/actors/scala/actors/Actor.scala
@@ -1,23 +1,33 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2005-2006, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id: $
+
package scala.actors
import scala.collection.mutable.HashSet
/**
- This object provides functions for the definition of actors and
- reactors, as well as all actor operations, such as
- receive
, react
, reply
,
- etc.
-
- @author Philipp Haller
+ * This object provides functions for the definition of actors and
+ * reactors, as well as all actor operations, such as
+ * receive
, react
, reply
,
+ * etc.
+ *
+ * @author Philipp Haller
*/
object Actor {
private[actors] val selfs = new java.util.WeakHashMap(16, 0.5f)
/**
- Returns the currently executing actor. Should be used instead
- of this
in all blocks of code executed by
- actors.
+ * Returns the currently executing actor. Should be used instead
+ * of this
in all blocks of code executed by
+ * actors.
*/
def self: Actor = synchronized {
val t = Thread.currentThread()
@@ -34,8 +44,8 @@ object Actor {
}
/**
- Creates an instance of a thread-based actor executing body
,
- and starts it.
+ * Creates an instance of a thread-based actor executing body
,
+ * and starts it.
*/
def actor(body: => Unit): ActorThread = synchronized {
val actor = new ActorThread {
@@ -46,9 +56,9 @@ object Actor {
}
/**
- Creates an instance of a thread-based actor specifying a
- channel which can be used for typed communication with other
- actors.
+ * Creates an instance of a thread-based actor specifying a
+ * channel which can be used for typed communication with other
+ * actors.
*/
def actor[a](ch: Channel[a])(body: => Unit): ActorThread = synchronized {
val actor = new ActorThread {
@@ -60,8 +70,8 @@ object Actor {
}
/**
- Creates an instance of an event-based reactor executing
- body
, and starts it.
+ * Creates an instance of an event-based reactor executing
+ * body
, and starts it.
*/
def reactor(body: => Unit): Reactor = synchronized {
val reactor = new Reactor {
@@ -72,12 +82,12 @@ object Actor {
}
/**
- Receives a message from the mailbox of
- self
. Blocks if no message matching any of the
- cases of f
can be received.
-
- Only (thread-based) actors may call this method. It fails at
- runtime if executed by a reactor.
+ * Receives a message from the mailbox of
+ * self
. Blocks if no message matching any of the
+ * cases of f
can be received.
+ *
+ * Only (thread-based) actors may call this method. It fails at
+ * runtime if executed by a reactor.
*/
def receive[a](f: PartialFunction[Any, a]): a =
self.in.receive(f)
@@ -244,10 +254,10 @@ object Actor {
}
/**
- This trait defines commonalities between thread-based and
- event-based actors.
-
- @author Philipp Haller
+ * This trait defines commonalities between thread-based and
+ * event-based actors.
+ *
+ * @author Philipp Haller
*/
trait Actor {
@@ -269,21 +279,21 @@ trait Actor {
}
/**
- The behavior of an actor is specified by implementing this
- abstract method. Note that the preferred way to create actors
- is through the actor
and reactor
- methods defined in object Actor
.
+ * The behavior of an actor is specified by implementing this
+ * abstract method. Note that the preferred way to create actors
+ * is through the actor
and reactor
+ * methods defined in object Actor
.
*/
def act(): Unit
/**
- Sends msg
to this actor (asynchronous).
+ * Sends msg
to this actor (asynchronous).
*/
def !(msg: Any): Unit = in ! msg
/**
- Sends msg
to this actor and awaits reply
- (synchronous).
+ * Sends msg
to this actor and awaits reply
+ * (synchronous).
*/
def !?(msg: Any): Any = in !? msg
@@ -397,25 +407,25 @@ trait Actor {
}
/**
- Messages of this type are sent to each actor a
- that is linked to an actor b
whenever
- b
terminates and a
has
- trapExit
set to true
.
-
- @author Philipp Haller
+ * Messages of this type are sent to each actor a
+ * that is linked to an actor b
whenever
+ * b
terminates and a
has
+ * trapExit
set to true
.
+ *
+ * @author Philipp Haller
*/
case class Exit(from: Actor, reason: String)
/**
- This class provides an implementation for actors based on
- threads. To be able to create instances of this class, the
- inherited abstract method act()
has to be
- implemented. Note that the preferred way of creating
- thread-based actors is through the actor
method
- defined in object Actor
.
-
- @author Philipp Haller
+ * This class provides an implementation for actors based on
+ * threads. To be able to create instances of this class, the
+ * inherited abstract method act()
has to be
+ * implemented. Note that the preferred way of creating
+ * thread-based actors is through the actor
method
+ * defined in object Actor
.
+ *
+ * @author Philipp Haller
*/
abstract class ActorThread extends Thread with ThreadedActor {
override def run(): Unit = {
@@ -456,10 +466,10 @@ abstract class ActorThread extends Thread with ThreadedActor {
}
/**
- This class provides a dynamic actor proxy for normal Java
- threads.
-
- @author Philipp Haller
+ * This class provides a dynamic actor proxy for normal Java
+ * threads.
+ *
+ * @author Philipp Haller
*/
private[actors] class ActorProxy(t: Thread) extends ThreadedActor {
def act(): Unit = {}
@@ -502,7 +512,7 @@ private[actors] class ActorProxy(t: Thread) extends ThreadedActor {
actor { // ... - val c = select(TcpNode("127.0.0.1", 9010), 'myName) + val c = select(TcpNode("127.0.0.1", 9010), 'myName) c ! msg // ... } @@ -517,8 +527,8 @@ object RemoteActor { private val kernels = new scala.collection.mutable.HashMap[Actor, NetKernel] /** - Makesself
remotely accessible on TCP port -port
. + * Makesself
remotely accessible on TCP port + *port
. */ def alive(port: int): Unit = { val serv = new TcpService(port) @@ -527,8 +537,8 @@ object RemoteActor { } /** - Registersa
undername
on this - node. + * Registersa
undername
on this + * node. */ def register(name: Symbol, a: Actor): Unit = { val kernel = kernels.get(Actor.self) match { @@ -544,8 +554,8 @@ object RemoteActor { } /** - Returns (a proxy for) the actor registered under -name
onnode
. + * Returns (a proxy for) the actor registered under + *name
onnode
. */ def select(node: Node, name: Symbol): Actor = new Reactor { @@ -575,16 +585,24 @@ object RemoteActor { /** - This class represents a machine node on a TCP network. - - @author Philipp Haller + * This class represents a machine node on a TCP network. + * + * @author Philipp Haller */ case class Node(address: String, port: Int) /** - This class is used by our efficient message queue - implementation. + *+ * This class is used by our efficient message queue + * implementation. + *
+ *
MessageQueue
provides an efficient
- implementation of a message queue specialized for this actor
- library. Classes in this package are supposed to be the only
- clients of this class.
-
- @author Martin Odersky, Philipp Haller
+ * The class MessageQueue
provides an efficient
+ * implementation of a message queue specialized for this actor
+ * library. Classes in this package are supposed to be the only
+ * clients of this class.
+ *
+ * @author Martin Odersky, Philipp Haller
*/
private[actors] class MessageQueue[Msg] extends MessageQueueResult[Msg] {
var msg: Msg = _
diff --git a/src/actors/scala/actors/Channel.scala b/src/actors/scala/actors/Channel.scala
index a7e723f72..0121b97ac 100644
--- a/src/actors/scala/actors/Channel.scala
+++ b/src/actors/scala/actors/Channel.scala
@@ -1,3 +1,13 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2005-2006, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id: $
+
package scala.actors
import Actor._
@@ -6,8 +16,8 @@ case object TIMEOUT
class SuspendActorException extends Throwable {
/*
- For efficiency reasons we do not fill in
- the execution stack trace.
+ * For efficiency reasons we do not fill in
+ * the execution stack trace.
*/
override def fillInStackTrace(): Throwable = {
this
@@ -15,11 +25,11 @@ class SuspendActorException extends Throwable {
}
/**
- This class provides a means for typed communication among
- actors. Only the actor creating an instance of a
- Channel
may receive from it.
-
- @author Philipp Haller
+ * This class provides a means for typed communication among
+ * actors. Only the actor creating an instance of a
+ * Channel
may receive from it.
+ *
+ * @author Philipp Haller
*/
class Channel[Msg] {
@@ -65,13 +75,13 @@ class Channel[Msg] {
}
/**
- Sends msg
to this Channel
.
+ * Sends msg
to this Channel
.
*/
def !(msg: Msg): unit = send(msg, self)
/**
- Sends msg
to this Channel
and
- awaits reply.
+ * Sends msg
to this Channel
and
+ * awaits reply.
*/
def !?(msg: Msg): Any = {
self.freshReply()
@@ -82,13 +92,13 @@ class Channel[Msg] {
}
/**
- Forwards msg
to this
keeping the
- last sender as sender instead of self
.
+ * Forwards msg
to this
keeping the
+ * last sender as sender instead of self
.
*/
def forward(msg: Msg): unit = send(msg, receiver.sender)
/**
- Receives a message from this Channel
.
+ * Receives a message from this Channel
.
*/
def receive[R](f: PartialFunction[Msg, R]): R = {
assert(self == receiver, "receive from channel belonging to other actor")
@@ -137,10 +147,10 @@ class Channel[Msg] {
}
/**
- Receives a message from this Channel
. If no
- message could be received before msec
- milliseconds elapsed, the TIMEOUT
action is
- executed if specified.
+ * Receives a message from this Channel
. If no
+ * message could be received before msec
+ * milliseconds elapsed, the TIMEOUT
action is
+ * executed if specified.
*/
def receiveWithin[R](msec: long)(f: PartialFunction[Any, R]): R = {
assert(self == receiver, "receive from channel belonging to other actor")
@@ -172,7 +182,7 @@ class Channel[Msg] {
}
/**
- receive
for reactors.
+ * receive
for reactors.
*/
def react(f: PartialFunction[Any, Unit]): Nothing = {
assert(self == receiver, "react on channel belonging to other actor")
@@ -193,7 +203,7 @@ class Channel[Msg] {
}
/**
- receiveWithin
for reactors.
+ * receiveWithin
for reactors.
*/
def reactWithin(msec: long)(f: PartialFunction[Any, Unit]): Nothing = {
assert(self == receiver, "react on channel belonging to other actor")
diff --git a/src/actors/scala/actors/Reactor.scala b/src/actors/scala/actors/Reactor.scala
index d8cb0d0bb..153220987 100644
--- a/src/actors/scala/actors/Reactor.scala
+++ b/src/actors/scala/actors/Reactor.scala
@@ -1,13 +1,23 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2005-2006, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id: $
+
package scala.actors
/**
- This class provides (together with Channel
) an
- implementation of event-based actors (aka reactors).
-
- The main ideas of our approach are explained in the paperChannel
) an
+ * implementation of event-based actors (aka reactors).
+ *
+ * The main ideas of our approach are explained in the paperReaction
associates an instance
- of a Reactor
with a
- java.lang.Runnable
. It is also the super class of
- the different kinds of tasks used for the execution of
- Reactor
s.
-
- @author Philipp Haller
+ * The abstract class Reaction
associates an instance
+ * of a Reactor
with a
+ * java.lang.Runnable
. It is also the super class of
+ * the different kinds of tasks used for the execution of
+ * Reactor
s.
+ *
+ * @author Philipp Haller
*/
private[actors] abstract class Reaction extends Runnable {
def actor: Reactor
}
/**
- This class represents task items used to start the execution
- of Reactor
s.
-
- @author Philipp Haller
+ * This class represents task items used to start the execution
+ * of Reactor
s.
+ *
+ * @author Philipp Haller
*/
private[actors] class StartTask(a: Reactor) extends Reaction {
def actor = a
@@ -100,15 +108,12 @@ private[actors] class StartTask(a: Reactor) extends Reaction {
a.exit("normal")
}
catch {
- case _: InterruptedException => {
+ case _: InterruptedException =>
a.exitLinked()
- }
- case d: SuspendActorException => {
+ case d: SuspendActorException =>
// do nothing (continuation is already saved)
- }
- case t: Throwable => {
+ case t: Throwable =>
a.exit(t.toString())
- }
}
finally {
Actor.selfs.put(t, saved)
@@ -117,11 +122,11 @@ private[actors] class StartTask(a: Reactor) extends Reaction {
}
/**
- This class represents task items used to execute actions
- specified in arguments of react
and
- reactWithin
.
-
- @author Philipp Haller
+ * This class represents task items used to execute actions
+ * specified in arguments of react
and
+ * reactWithin
.
+ *
+ * @author Philipp Haller
*/
private[actors] class ActorTask(a: Reactor,
f: PartialFunction[Any, Unit],
@@ -142,13 +147,12 @@ private[actors] class ActorTask(a: Reactor,
a.exit("normal")
}
catch {
- case _: InterruptedException => a.exitLinked()
- case d: SuspendActorException => {
+ case _: InterruptedException =>
+ a.exitLinked()
+ case d: SuspendActorException =>
// do nothing (continuation is already saved)
- }
- case t: Throwable => {
+ case t: Throwable =>
a.exit(t.toString())
- }
}
finally {
Actor.selfs.put(t, saved)
diff --git a/src/actors/scala/actors/Scheduler.scala b/src/actors/scala/actors/Scheduler.scala
index 429437a6c..57e04fa7c 100644
--- a/src/actors/scala/actors/Scheduler.scala
+++ b/src/actors/scala/actors/Scheduler.scala
@@ -1,13 +1,23 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2005-2006, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id: $
+
package scala.actors
-import scala.collection.mutable.{Queue,Buffer,ArrayBuffer}
+import scala.collection.mutable.{ArrayBuffer, Buffer, Queue}
/**
- The Scheduler
object is used by
- Reactor
to execute tasks of an execution of a
- reactor.
-
- @author Philipp Haller
+ * The Scheduler
object is used by
+ * Reactor
to execute tasks of an execution of a
+ * reactor.
+ *
+ * @author Philipp Haller
*/
object Scheduler {
private var sched: IScheduler =
@@ -22,18 +32,16 @@ object Scheduler {
sched.execute(task)
}
- def tick(a: Reactor) = {
- sched.tick(a)
- }
+ def tick(a: Reactor) = sched.tick(a)
def shutdown(): Unit = sched.shutdown()
}
/**
- This abstract class provides a common interface for all
- schedulers used to execute reactors.
-
- @author Philipp Haller
+ * This abstract class provides a common interface for all
+ * schedulers used to execute reactors.
+ *
+ * @author Philipp Haller
*/
abstract class IScheduler {
def execute(task: Reaction): Unit
@@ -50,10 +58,10 @@ abstract class IScheduler {
}
/**
- This scheduler executes the tasks of a reactor on a single
- thread (the current thread).
-
- @author Philipp Haller
+ * This scheduler executes the tasks of a reactor on a single
+ * thread (the current thread).
+ *
+ * @author Philipp Haller
*/
class SingleThreadedScheduler extends IScheduler {
def execute(task: Reaction): Unit = {
@@ -69,10 +77,10 @@ class SingleThreadedScheduler extends IScheduler {
}
/**
- This scheduler creates additional threads whenever there is no
- idle thread available.
-
- @author Philipp Haller
+ * This scheduler creates additional threads whenever there is no
+ * idle thread available.
+ *
+ * @author Philipp Haller
*/
class SpareWorkerScheduler extends IScheduler {
private val tasks = new Queue[Reaction]
@@ -82,7 +90,7 @@ class SpareWorkerScheduler extends IScheduler {
private var maxWorkers = 2
def init() = {
- for (val i <- List.range(0, 2)) {
+ for (val i <- 0 until 2) {
val worker = new WorkerThread(this)
workers += worker
worker.start()
@@ -121,7 +129,7 @@ class SpareWorkerScheduler extends IScheduler {
def shutdown(): Unit = synchronized {
terminating = true
val numNonIdle = workers.length - idle.length
- for (val i <- List.range(0, numNonIdle))
+ for (val i <- 0 until numNonIdle)
tasks += QUIT_TASK
val idleThreads = idle.elements
while (idleThreads.hasNext) {
@@ -133,10 +141,10 @@ class SpareWorkerScheduler extends IScheduler {
}
/**
- This class is used by schedulers to execute reactor tasks on
- multiple threads.
-
- @author Philipp Haller
+ * This class is used by schedulers to execute reactor tasks on
+ * multiple threads.
+ *
+ * @author Philipp Haller
*/
class WorkerThread(sched: IScheduler) extends Thread {
private var task: Runnable = null
@@ -150,9 +158,7 @@ class WorkerThread(sched: IScheduler) extends Thread {
override def run(): Unit = synchronized {
try {
while (running) {
- if (task != null) {
- task.run()
- }
+ if (task != null) task.run()
task = sched.getTask(this)
if (task == sched.QUIT_TASK) {
running = false
diff --git a/src/actors/scala/actors/ThreadedActor.scala b/src/actors/scala/actors/ThreadedActor.scala
index 2e3e8ecc2..3a0f49c82 100644
--- a/src/actors/scala/actors/ThreadedActor.scala
+++ b/src/actors/scala/actors/ThreadedActor.scala
@@ -1,3 +1,13 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2005-2006, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id: $
+
package scala.actors
/**
diff --git a/src/actors/scala/actors/TimerThread.scala b/src/actors/scala/actors/TimerThread.scala
index 205789415..33b24ca74 100644
--- a/src/actors/scala/actors/TimerThread.scala
+++ b/src/actors/scala/actors/TimerThread.scala
@@ -1,9 +1,19 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2005-2006, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id: $
+
package scala.actors
/**
* This class allows the (local) sending of a message to an actor after
- * a timeout. Used by the library to build receiveWithin(time: long).
- * Note that the library deletes non-received TIMEOUT message if a
+ * a timeout. Used by the library to build receiveWithin(time: long)
.
+ * Note that the library deletes non-received TIMEOUT
message if a
* message is received before the time-out occurs.
*
* @author Sebastien Noir
diff --git a/src/actors/scala/actors/remote/FreshNameCreator.scala b/src/actors/scala/actors/remote/FreshNameCreator.scala
index 2e30c69f1..f832c23b7 100644
--- a/src/actors/scala/actors/remote/FreshNameCreator.scala
+++ b/src/actors/scala/actors/remote/FreshNameCreator.scala
@@ -1,3 +1,13 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2005-2006, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id: $
+
package scala.actors.remote
object FreshNameCreator {
diff --git a/src/actors/scala/actors/remote/JavaSerializer.scala b/src/actors/scala/actors/remote/JavaSerializer.scala
index 94dabc3b4..7dd6f09c2 100644
--- a/src/actors/scala/actors/remote/JavaSerializer.scala
+++ b/src/actors/scala/actors/remote/JavaSerializer.scala
@@ -1,8 +1,20 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2005-2006, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id: $
+
package scala.actors.remote
-import java.io.{ByteArrayInputStream,ByteArrayOutputStream,ObjectInputStream,ObjectOutputStream}
+import java.io.{ByteArrayInputStream, ByteArrayOutputStream,
+ ObjectInputStream, ObjectOutputStream}
class JavaSerializer(serv: Service) extends Serializer(serv) {
+
def serialize(o: AnyRef): Array[Byte] = {
val bos = new ByteArrayOutputStream()
val out = new ObjectOutputStream(bos)
diff --git a/src/actors/scala/actors/remote/NetKernel.scala b/src/actors/scala/actors/remote/NetKernel.scala
index 19d6f81f6..5209ae406 100644
--- a/src/actors/scala/actors/remote/NetKernel.scala
+++ b/src/actors/scala/actors/remote/NetKernel.scala
@@ -1,8 +1,16 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2005-2006, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id: $
+
package scala.actors.remote
-import java.io.{IOException,StringReader,StringWriter}
-import java.net.UnknownHostException
-import scala.collection.mutable.{HashMap,HashSet}
+import scala.collection.mutable.{HashMap, HashSet}
case class NamedSend(senderName: Symbol, receiver: Symbol, data: Array[Byte])
@@ -25,7 +33,8 @@ class NetKernel(service: Service) {
register(freshName, Actor.self)
freshName
}
- case Some(name) => name
+ case Some(name) =>
+ name
}
namedSend(node, senderName, name, msg)
}
@@ -40,9 +49,8 @@ class NetKernel(service: Service) {
def act() = { a ! msg }
override def !(msg: Any): Unit = {
msg match {
- case refmsg: AnyRef => {
+ case refmsg: AnyRef =>
namedSend(senderNode, receiver, senderName, refmsg)
- }
}
}
override def !?(msg: Any): Any =
@@ -50,7 +58,8 @@ class NetKernel(service: Service) {
}
senderProxy.start()
}
- case None => // message is lost
+ case None =>
+ // message is lost
}
}
}
diff --git a/src/actors/scala/actors/remote/Serializer.scala b/src/actors/scala/actors/remote/Serializer.scala
index f68fdce26..c4f5dc680 100644
--- a/src/actors/scala/actors/remote/Serializer.scala
+++ b/src/actors/scala/actors/remote/Serializer.scala
@@ -1,6 +1,16 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2005-2006, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id: $
+
package scala.actors.remote
-import java.io.{DataInputStream,DataOutputStream,EOFException,IOException}
+import java.io.{DataInputStream, DataOutputStream, EOFException, IOException}
abstract class Serializer(val service: Service) {
def serialize(o: AnyRef): Array[byte]
diff --git a/src/actors/scala/actors/remote/Service.scala b/src/actors/scala/actors/remote/Service.scala
index a9ccb3240..6b32cd1d8 100644
--- a/src/actors/scala/actors/remote/Service.scala
+++ b/src/actors/scala/actors/remote/Service.scala
@@ -1,3 +1,13 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2005-2006, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id: $
+
package scala.actors.remote
trait Service {
diff --git a/src/actors/scala/actors/remote/TcpService.scala b/src/actors/scala/actors/remote/TcpService.scala
index 0237cc0e9..715749dd9 100644
--- a/src/actors/scala/actors/remote/TcpService.scala
+++ b/src/actors/scala/actors/remote/TcpService.scala
@@ -1,8 +1,19 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2005-2006, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id: $
+
package scala.actors.remote
-import java.io.{DataInputStream,DataOutputStream,BufferedReader,PrintWriter,
- IOException,InputStreamReader,OutputStreamWriter}
-import java.net.{InetAddress,ServerSocket,Socket,UnknownHostException}
+import java.io.{BufferedReader, DataInputStream, DataOutputStream,
+ IOException, InputStreamReader, OutputStreamWriter,
+ PrintWriter}
+import java.net.{InetAddress, ServerSocket, Socket, UnknownHostException}
object TcpService {
val random = new java.util.Random(System.currentTimeMillis())
diff --git a/src/compiler/scala/tools/nsc/SubComponent.scala b/src/compiler/scala/tools/nsc/SubComponent.scala
index 28fb6c1be..6d0140d60 100644
--- a/src/compiler/scala/tools/nsc/SubComponent.scala
+++ b/src/compiler/scala/tools/nsc/SubComponent.scala
@@ -1,29 +1,40 @@
-/* NSC -- new scala compiler
- * Copyright 2005 LAMP/EPFL
+/* NSC -- new Scala compiler
+ * Copyright 2005-2006 LAMP/EPFL
* @author Martin Odersky
*/
// $Id$
-package scala.tools.nsc;
-/** An nsc sub-component.
+package scala.tools.nsc
+
+/** + * An nsc sub-component. + *
+ *
+ * The class Names
...
+ *
+ * A base class for transforms. + * A transform contains a compiler phase which applies a tree transformer. + *
+ *+ * A base class for transforms. + * A transform contains a compiler phase which applies a tree transformer. + *
+ *caseArity
, caseElement
implementations added
+ * to case classes
+ * equals
, hashCode
and toString
+ * methods are added to case classes, unless they are defined in the
+ * class or a baseclass different from java.lang.Object
+ * toString
method is added to case objects, unless they
+ * are defined in the class or a baseclass different from
+ * java.lang.Object
+ * + * A common class for lightweight sets. + *
+ *+ * Uses positions that are offsets rather than line/column pairs. + *
+ *BitSet
provides the interface for a space-efficient
- * implementation of dense integer sets represented as bits in array of
- * integers. Bit indices are between 0..(capacity-1) inclusive.
+/**
+ * The class BitSet
provides the interface for a space-efficient
+ * implementation of dense integer sets represented as bits in array of
+ * integers. Bit indices are between 0..(capacity-1) inclusive.
+ *
size
represents the number of relevant bits
- * @param ba
array of ints of length n
>>>5
- * @param copy
if yes, then ba
is copied and updates will
- * not affect this bitset
+ * @param size size
represents the number of relevant bits
+ * @param capacity ...
+ * @param ba ba
array of ints of length
+ * n>>>5
+ * @param copy copy
if yes, then ba
is copied
+ * and updates will not affect this bitset
*
* @author Burak Emir, Nikolay Mihaylov
* @version 1.0
diff --git a/src/library/scala/io/Position.scala b/src/library/scala/io/Position.scala
index cd08fee7d..bcbd65e67 100644
--- a/src/library/scala/io/Position.scala
+++ b/src/library/scala/io/Position.scala
@@ -13,23 +13,36 @@ package scala.io
import compat.StringBuilder
-/** convenience methods to encode line and column number in one
- * single integer. The encode line (column)
- * numbers range from 0 to LINE_MASK (COLUMN_MASK), where 0 indicates
- * that the line (column) is the undefined and 1 represents the first
- * line (column). Line (Column) numbers greater than LINE_MASK
- * (COLUMN_MASK) are replaced by LINE_MASK (COLUMN_MASK). Furthermore,
- * if the encoded line number is LINE_MASK, the column number is
- * always set to 0.
-
- * The following properties hold:
- * - the undefined position is 0: encode(0,0) == 0
- * - encodings are non-negative : encode(line,column) >= 0
- * - position order is preserved:
- * (line1 < line2) || (line1 == line2 && column1 < column2)
- * implies
- * encode(line1,column1) <= encode(line2,column2)
- * @author Burak Emir (translated from work by Matthias Zengers and others)
+/**
+ * The object Position
provides convenience methods to encode
+ * line and column number in one single integer. The encode line (column)
+ * numbers range from 0 to LINE_MASK
+ * (COLUMN_MASK
), where 0 indicates that the line (column) is
+ * the undefined and 1 represents the first line (column). Line (Column)
+ * numbers greater than LINE_MASK
+ * (COLUMN_MASK
) are replaced by LINE_MASK
+ * (COLUMN_MASK
). Furthermore, if the encoded line number is
+ * LINE_MASK
, the column number is always set to 0.
+ *
+ * The following properties hold: + *
+ *encode(0,0) == 0
+ * encode(line,column) >= 0
+ * (line1 < line2) || (line1 == line2 && column1 < column2)
+ * encode(line1,column1) <= encode(line2,column2)
+ *