This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: Problem with synchronized
- To: Emmanuel Castro <castro at lirmm dot fr>
- Subject: Re: Problem with synchronized
- From: Per Bothner <per at bothner dot com>
- Date: 07 Aug 2001 15:51:11 -0700
- Cc: kawa at sourceware dot cygnus dot com
- References: <3B6FE84D.355C89E@lirmm.fr>
Emmanuel Castro <castro@lirmm.fr> writes:
> It seems that synchronized dislike being enclosed in a let
Actually, that's only accidental. The problem is that I recently
changed "top-level" of a module to be evaluated to a ConsumerTarget.
Please try the following patch:
Index: SynchronizedExp.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/expr/SynchronizedExp.java,v
retrieving revision 1.3
diff -u -r1.3 SynchronizedExp.java
--- SynchronizedExp.java 2001/06/04 16:50:33 1.3
+++ SynchronizedExp.java 2001/08/07 22:41:45
@@ -32,8 +32,10 @@
code.emitStore(objvar);
code.emitMonitorEnter();
code.emitTryStart(false,
- target instanceof IgnoreTarget ? null
+ (target instanceof IgnoreTarget
+ || target instanceof ConsumerTarget) ? null
: target.getType());
+
body.compileWithPosition(comp, target);
code.emitLoad(objvar);
code.emitMonitorExit();
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/