This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Problem with synchronized
- To: kawa at sourceware dot cygnus dot com
- Subject: Problem with synchronized
- From: Emmanuel Castro <castro at lirmm dot fr>
- Date: Tue, 07 Aug 2001 15:08:29 +0200
When I start Kawa 1.6.94 and I type the following in the interactive
interpreter :
(define w (make <java.awt.Point> 4 5))
(synchronized w
(display (field w 'x)))
It works, but when typing :
(let ((w (make <java.awt.Point> 4 5)))
(synchronized w
(display (field w 'x))))
It crashes :
java.lang.Error: popType called with empty stack ClassType
atInteractiveLevel apply(gnu.mapping.CallContext)void
at gnu.bytecode.CodeAttr.popType(CodeAttr.java:205)
at gnu.bytecode.CodeAttr.emitStore(CodeAttr.java:877)
at gnu.bytecode.CodeAttr.emitTryEnd(CodeAttr.java:1601)
at gnu.expr.SynchronizedExp.compile(SynchronizedExp.java:40)
at gnu.expr.Expression.compileNotePosition(Expression.java:60)
at gnu.expr.Expression.compileWithPosition(Expression.java:47)
at gnu.expr.LetExp.compile(LetExp.java:73)
at gnu.expr.Expression.compileNotePosition(Expression.java:60)
at gnu.expr.Expression.compileWithPosition(Expression.java:47)
at gnu.expr.BeginExp.compile(BeginExp.java:80)
at gnu.expr.Expression.compileWithPosition(Expression.java:50)
at gnu.expr.LetExp.compile(LetExp.java:73)
at gnu.expr.Expression.compileWithPosition(Expression.java:50)
at gnu.expr.Compilation.addClass(Compilation.java:1152)
at gnu.expr.Compilation.<init>(Compilation.java:631)
at gnu.expr.ModuleExp.evalToClass(ModuleExp.java:70)
at gnu.expr.ModuleExp.eval(ModuleExp.java:38)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:180)
at kawa.Shell.run(Shell.java:93)
at kawa.Shell.run(Shell.java:35)
at kawa.repl.apply0(repl.java:27)
at gnu.mapping.Future.run(Future.java:59)
It seems that synchronized dislike being enclosed in a let
Have fun...