diff options
author | michelou <michelou@epfl.ch> | 2006-09-21 10:33:43 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2006-09-21 10:33:43 +0000 |
commit | 2282fe8e8d2e16679aa4a612fdf2fc410006759d (patch) | |
tree | 7739f08d8237e10c71283721f25220516dfc2df9 /src/compiler/scala/tools/nsc/backend/WorklistAlgorithm.scala | |
parent | 8bb69c4fa852b784569b43a83d41a4834bebfabf (diff) | |
download | scala-2282fe8e8d2e16679aa4a612fdf2fc410006759d.tar.gz scala-2282fe8e8d2e16679aa4a612fdf2fc410006759d.tar.bz2 scala-2282fe8e8d2e16679aa4a612fdf2fc410006759d.zip |
removed leading/trailing tabs/blanks in scala/c...
removed leading/trailing tabs/blanks in scala/concurrent/*.scala
Diffstat (limited to 'src/compiler/scala/tools/nsc/backend/WorklistAlgorithm.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/WorklistAlgorithm.scala | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/WorklistAlgorithm.scala b/src/compiler/scala/tools/nsc/backend/WorklistAlgorithm.scala index d6b81a84fe..4dc52f02de 100644 --- a/src/compiler/scala/tools/nsc/backend/WorklistAlgorithm.scala +++ b/src/compiler/scala/tools/nsc/backend/WorklistAlgorithm.scala @@ -1,14 +1,14 @@ -/* 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.backend; +package scala.tools.nsc.backend -import scala.tools.nsc.ast._; -import scala.collection.mutable.MutableList; +import scala.tools.nsc.ast._ +import scala.collection.mutable.MutableList /** * Simple implementation of a worklist algorithm. A processing @@ -16,17 +16,19 @@ import scala.collection.mutable.MutableList; * worklist, as long as the stack is not empty. * * The client class should mix-in this class and initialize the - * worklist field and define the processElement method. Then call - * the 'run' method providing a function that initializes the - * worklist. + * worklist field and define the <code>processElement</code> method. + * Then call the <code>run</code> method providing a function that + * initializes the worklist. * - * @see scala.tools.nsc.backend.icode.Linearizers + * @author Martin Odersky + * @version 1.0 + * @see scala.tools.nsc.backend.icode.Linearizers */ trait WorklistAlgorithm { - type Elem; - type WList <: MutableList[Elem]; + type Elem + type WList <: MutableList[Elem] - val worklist: WList; + val worklist: WList /** * Run the iterative algorithm until the worklist @@ -34,7 +36,7 @@ trait WorklistAlgorithm { * the loop starts and should initialize the worklist. */ def run(initWorklist: => Unit) = { - initWorklist; + initWorklist while (!(worklist.length == 0)) processElement(dequeue); @@ -43,8 +45,10 @@ trait WorklistAlgorithm { /** * Process the current element from the worklist. */ - def processElement(e: Elem): Unit; + def processElement(e: Elem): Unit - /** Remove and return the first element to be processed from the worklist. */ - def dequeue: Elem; + /** + * Remove and return the first element to be processed from the worklist. + */ + def dequeue: Elem } |