diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2009-12-08 10:16:16 +0000 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2009-12-08 10:16:16 +0000 |
commit | 64f63ab3961b0c0497895bcccc6285d18aa2ca0f (patch) | |
tree | a5df14f5e1ed7e8a7d21c4f8bfcfa6a30d937287 | |
parent | a4011632f75e29875d656466d5bc20b89fb476be (diff) | |
download | scala-64f63ab3961b0c0497895bcccc6285d18aa2ca0f.tar.gz scala-64f63ab3961b0c0497895bcccc6285d18aa2ca0f.tar.bz2 scala-64f63ab3961b0c0497895bcccc6285d18aa2ca0f.zip |
make exception handlers catching faster.
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala index 95af7a8c03..8e41801d3f 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala @@ -986,9 +986,11 @@ abstract class GenJVM extends SubComponent { if (settings.debug.value) log("Adding exception handler " + e + "at block: " + e.startBlock + " for " + method + " from: " + p._1 + " to: " + p._2 + " catching: " + e.cls); + val cls = if (e.cls == NoSymbol || e.cls == definitions.ThrowableClass) null + else javaName(e.cls) jcode.addExceptionHandler(p._1, p._2, labels(e.startBlock).getAnchor(), - if (e.cls == NoSymbol) null else javaName(e.cls)) + cls) } else log("Empty exception range: " + p) } |