From c126ff44cafe3647bb5997a93074501dfc855388 Mon Sep 17 00:00:00 2001 From: Iulian Dragos Date: Mon, 7 May 2007 08:52:05 +0000 Subject: Fixed crash on synchronized with 'return' insid... Fixed crash on synchronized with 'return' inside try-finally block. --- src/compiler/scala/tools/nsc/backend/icode/GenICode.scala | 2 ++ 1 file changed, 2 insertions(+) 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 -- cgit v1.2.3