This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Different results with eval and compileToFiles()
- To: kawa at sources dot redhat dot com
- Subject: Different results with eval and compileToFiles()
- From: "Bradley M. Kuhn" <bkuhn at ebb dot org>
- Date: Sat, 23 Dec 2000 11:35:16 -0500
- References: <20001211065158.I13562@ebb.org>
I have a very simple Perl program that I compiled to Kawa's IR:
It looks like this:
(#%module/1/ (
Declaration[scalar_x/1/]
) (#%begin
(#%set! scalar_x (#%quote (#%Scalar "Hello
")))
(#%apply (#%quote #<primitive procedure int
gnu.perl.lang.Functions.print$V(java.lang.Object[])>)
(#%ref/1/ scalar_x))))
When I call evalModule on the ModuleExp itself, the program works, and
prints "Hello\n".
However, when I compileToFiles() and then run "kaffe ClassName", the print$V
function gets a null pointer argument.
I did build the Declaration object by hand, and called the ModuleExpr's
add() to place it there.
I created the SetExp and ReferenceExp with that same Declaration object.
Can anyone tell me what I am missing?
I suspected that somehow the "scalar_x" variable was being set and used in
the Environment rather than in the Module itself, but I couldn't find a way
to easily figure that out.
BTW, has anyone found a good class decompiler that can decompile
Kawa-generated .class files easily? It seems that would make debugging a
bit easier.
--
Bradley M. Kuhn - http://www.ebb.org/bkuhn
PGP signature