This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Dead variable compiler error
- From: "Dominique Boucher" <dominique dot boucher at nuecho dot com>
- To: "'Kawa List'" <kawa at sources dot redhat dot com>
- Date: Tue, 27 Apr 2004 14:37:30 -0400
- Subject: Dead variable compiler error
- Reply-to: <dominique dot boucher at nuecho dot com>
Hi,
Maybe I'm doing something wrong, but the code below results in the following
compiler error (using Kawa 1.7.90 on Windows XP with the JDK 1.4.1_01):
(dboucher@Forman) (14:28:16) [tmp] kawa -C test.scm (compiling test.scm)
Internal error while compiling test.scm:15
java.lang.Error: attempting to push dead variable
at gnu.bytecode.CodeAttr.emitLoad(CodeAttr.java:1047)
at gnu.expr.Declaration.load(Declaration.java:140)
at gnu.expr.ReferenceExp.compile(ReferenceExp.java:118)
....
;---------------------------------------------
(module-name <test>)
(module-static #t)
(module-export <A>)
(define-simple-class <A> (<java.lang.Object>)
((execute (x :: <int>) (y :: <int>) (z :: <int>) (w :: <int>)) :: <void>
#!void))
(define-simple-class <B> (<A>)
(objects type: <list> init-keyword: objects:)
((execute (x :: <int>) (y :: <int>) (z :: <int>) (w :: <int>)) :: <void>
(for-each
(lambda (object :: <A>)
(invoke object 'execute x y z y))
objects)))
;----------------------------------------------
If I remove the (module-export <A>) clause or add <B> to the exported
variables, everything works fine.
Any idea?
Dominique Boucher, Ph.D.
Lead Developer
Nü Écho Inc
www.nuecho.com
Tél: (514) 861-3246 x 231