This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problem with synchronized


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]