summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/backend/icode/ExceptionHandlers.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/scala/tools/nsc/backend/icode/ExceptionHandlers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/ExceptionHandlers.scala9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/icode/ExceptionHandlers.scala b/src/compiler/scala/tools/nsc/backend/icode/ExceptionHandlers.scala
index 8c6d9a4490..94db998bff 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/ExceptionHandlers.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/ExceptionHandlers.scala
@@ -7,8 +7,7 @@
package scala.tools.nsc.backend.icode;
-import scala.collection.mutable.HashMap;
-import scala.collection.mutable.HashSet;
+import scala.collection._
/**
* Exception handlers are pieces of code that `handle' exceptions on
@@ -34,15 +33,15 @@ trait ExceptionHandlers { self: ICodes =>
def startBlock = _startBlock;
/** The list of blocks that are covered by this exception handler */
- var covered: List[BasicBlock] = Nil;
+ var covered: immutable.Set[BasicBlock] = immutable.HashSet.empty[BasicBlock]
def addCoveredBlock(b: BasicBlock): ExceptionHandler = {
- covered = b :: covered;
+ covered = covered + b
this
}
/** Is `b' covered by this exception handler? */
- def covers(b: BasicBlock): Boolean = covered.contains(b);
+ def covers(b: BasicBlock): Boolean = covered(b);
/** The body of this exception handler. May contain 'dead' blocks (which will not
* make it into generated code because linearizers may not include them) */