This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Kawa 1.6.98/1.6.99 compiler bug?
- From: Tom Shields <Tom at OjodeAgua dot COM>
- To: kawa at sources dot redhat dot com
- Date: Thu, 20 Jun 2002 00:48:24 -0500
- Subject: Kawa 1.6.98/1.6.99 compiler bug?
In late 1998 thru early 1999, one of my employees developed an prototype
real-time event pattern monitoring framework using Java (1.1.7, at the
time) for the low-level network IO and Kawa (1.6.57, at the time) for
the pattern definition, recognition, and reaction. The framework and
application was shelved after we lost the contract follow-on, and the
original Schemer is no longer working for us.
I am now trying to resurrect the project and make some enhancements,
including upgrading the application to the current releases of Java and
Kawa ... and I've run into a compiler bug with the current version of
Kawa. I can't find a copy of Kawa 1.6.57, so I can't demonstrate that
the archived source code actually compiled without error, but class
files with matching names exist in the archive and work.
I've been using Kawa 1.6.98 (release jar binary) and Sun Java JDK
1.3.1_03 on RedHat Linux 7.3, and I've just downloaded 1.6.99 ... the
compiler diagnostic output below is from the 1.6.99 compiler, and
differs from 1.6.98 only in the internal line numbers of the backtrace.
The Scheme source code for the framework layer that connects to the Java
underpinnings is full of Java method invocation procedure values, such
as follows:
(define file-name-of-file (primitive-virtual-method <java.io.File>
"getPath" <String> ()))
which (apparently) compiled with no problems under Kawa 1.6.57 but
generates the following output under 1.6.99 when compiling into class
files using "kawa -C kawabug.scm" (where kawabug.scm contains the
expression above):
<unknown>:0: Literals: Internal error:java.lang.Error:
gnu.expr.PrimProcedure does not implement Externalizable
java.lang.Error: gnu.expr.PrimProcedure does not implement Externalizable
at gnu.expr.LitTable.error(LitTable.java:82)
at gnu.expr.LitTable.writeObject(LitTable.java:217)
at gnu.expr.LitTable.emit(LitTable.java:45)
at gnu.expr.Compilation.emitLiterals(Compilation.java:414)
at gnu.expr.Compilation.addClass(Compilation.java:1348)
at gnu.expr.Compilation.<init>(Compilation.java:740)
at gnu.expr.ModuleExp.compileToFiles(ModuleExp.java:277)
at kawa.lang.CompileFile.compile_to_files(CompileFile.java:91)
at kawa.repl.processArgs(repl.java:389)
at kawa.repl.main(repl.java:584)
Replacing the offending pseudo-lambda expressions with procedure
definitions, such as:
(define (file-name-of-file f) ((primitive-virtual-method
<java.io.File> "getPath" <String> ()) f))
eliminates the compiler errors, but the higher layers of the Scheme
framework passes the procedure values around, and I'd like to avoid
having to do major re-writes of the original code at this point in the
project.
I suppose that the easiest option is to ask if someone can provide me
with a copy of Kawa 1.6.57 ... but maybe someone can figure out how fix
the compiler bug as well.
Thanks for any help in advance,
Tom Shields