summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2007-05-07 08:52:05 +0000
committerIulian Dragos <jaguarul@gmail.com>2007-05-07 08:52:05 +0000
commitc126ff44cafe3647bb5997a93074501dfc855388 (patch)
treecb941580bbea2121077cfe83f09e15446f862a9c /src
parente70118f238b9ca2a729eebad3dc747b6e9f9986c (diff)
downloadscala-c126ff44cafe3647bb5997a93074501dfc855388.tar.gz
scala-c126ff44cafe3647bb5997a93074501dfc855388.tar.bz2
scala-c126ff44cafe3647bb5997a93074501dfc855388.zip
Fixed crash on synchronized with 'return' insid...
Fixed crash on synchronized with 'return' inside try-finally block.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/GenICode.scala2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
index e8e251c2fa..0bf4bfe83c 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
@@ -456,8 +456,10 @@ abstract class GenICode extends SubComponent {
val oldcleanups = ctx1.cleanups
for (op <- ctx1.cleanups) op match {
case MonitorRelease(m) =>
+ if (settings.debug.value) log("removing " + m + " from cleanups: " + ctx1.cleanups)
ctx1.bb.emit(LOAD_LOCAL(m))
ctx1.bb.emit(MONITOR_EXIT())
+ ctx1.exitSynchronized(m)
case Finalizer(f) =>
if (settings.debug.value) log("removing " + f + " from cleanups: " + ctx1.cleanups)
// we have to run this without the same finalizer in