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]

Kawa compiled using Gcj


I just checked in a number of patches to Gcj, the gcc-based
ahead-of-time compiler for Java.  These allow Gcj to compile all of
the 1.4MB kawa-compiled.zip file consisting of a mix of Java and
Scheme code compiled to .class files and thence to an executable.
This is the first time I have been able to compile all of Kawa in a
long time, *and* its the first time the run-time code generation
works.  What I did was:

        gcj --main=kawa.repl kawa-1.6.71-compiled.zip  -o kawa.exe -g -v

I was then able to do:

        ./kawa.exe
        #|kawa:1|# (list 'Hello "world!")
        (Hello world!)
        #|kawa:2|# (define xx 20)
        #|kawa:3|# (define (plus20 x) (+ x xx))
        #|kawa:4|# (plus20 12)
        32

The interesting thing to note is that defining the function plus20
causes Kawa to generate bytecode for the function, load the new
bytecode with a ClassLoader, and then execute it using the interpreter.

This is still not ready for prime time.  I had to undo a recent
(non-Java ix86-related) patch.  I also had some problems because
Swing classes got pulled into the .zip file.  And of course we
need documentation.

But it seems we are close to being to compile Kawa itself and
Kawa-compiled Scheme programs to native code, at least on
architectures supported by Gcj.  And we may be able to use
Gdb to debug Kawa programs, though that will probably require
work before it is pleasant.
-- 
	--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]