kawa-commonlisp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Kawa-commonlisp-dev] [GSoC] Status


From: Jamison Hope
Subject: Re: [Kawa-commonlisp-dev] [GSoC] Status
Date: Thu, 9 Aug 2012 14:37:37 -0400

Hi, Charlie,

On Aug 9, 2012, at 1:58 PM, Charles Turner wrote:

I've cleaned up the repository, it should build without any problems now. I've tried to reduce the problem by commenting out most of the new def*Fld's in CommonLisp, this is what I've noticed:

* With all the def*Fld's commented out, I would get warnings when compiling the primitives.lisp files about LENGTH, GENSYM and SYMBOL- NAME being unbound, this made sense because their call sites were before their definitions (and hence the warnings would disappear compiling again, if loadClass(primitives) is not commented out). Adding def*Fld's for these three functions caused an error rather than a warning when building the primitives from scratch:

primitives.lisp:152:23: exception loading 'COMMON-LISP:SYMBOL-NAME' - no such class: gnu.commonlisp.lisp.primitives
[ and similar messages for the other two examples ]

* Once the primitives file is compiled and I use loadClass on it, everything appears to work fine, the names are bound from the REPL, etc.

* If you remove the loadClass("gnu.commonlisp.lisp.primitives") line after the primitives file has been compiled, no names appear to be bound from the REPL, for example, assuming this is uncommented in CommonLisp:

defProcStFld("gensym", "gnu.commonlisp.lisp.primitives");

Then from the REPL I see:

#|kawa:1|# #'gensym
/dev/stdin:1:3: warning - no declaration seen for COMMON-LISP:GENSYM
/dev/stdin:1:3: unbound location
   at gnu.kawa.reflect.FieldLocation.get(FieldLocation.java:200)
   at gnu.kawa.reflect.FieldLocation.get(FieldLocation.java:188)
   at gnu.mapping.PlainLocation.get(PlainLocation.java:21)
   at gnu.mapping.SharedLocation.get(SharedLocation.java:21)
   [ snipped ... ]

which is the same output as when the above defProcStFld(gensym..) is commented out, so it appears to do nothing at the moment.

I'm seeing that as well. I moved LENGTH, GENSYM, and SYMBOL-NAME up in
the file a bit so that their definitions come before their first calls
and that got rid of the "exception loading 'COMMON-LISP:LENGTH' - no
such class: gnu.commonlisp.lisp.primitives" and "exception loading
'COMMON-LISP:LENGTH' - null" errors.

With the loadClass() call in CommonLisp commented out, the functions remain
unbound until gnu.commonlisp.lisp.primitives is explicitly loaded:

$ kawa --lisp
#|kawa:1|# #'gensym
/dev/stdin:1:3: warning - no declaration seen for COMMON-LISP:GENSYM
/dev/stdin:1:3: unbound location
        at gnu.kawa.reflect.FieldLocation.get(FieldLocation.java:200)
        at gnu.kawa.reflect.FieldLocation.get(FieldLocation.java:188)
        at gnu.mapping.PlainLocation.get(PlainLocation.java:21)
        at gnu.mapping.SharedLocation.get(SharedLocation.java:21)
        at gnu.mapping.ThreadLocation.get(ThreadLocation.java:105)
        at atInteractiveLevel$1.run(stdin:1)
        at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:309)
        at gnu.expr.ModuleExp.evalModule(ModuleExp.java:210)
        at kawa.Shell.run(Shell.java:279)
        at kawa.Shell.run(Shell.java:194)
        at kawa.Shell.run(Shell.java:175)
        at kawa.repl.main(repl.java:891)
#|kawa:2|# (require class::|gnu.commonlisp.lisp.primitives|)
#|kawa:3|# #'gensym
#<procedure GENSYM>


So for now I guess leave it in there. Not sure why it works for Scheme
but not for Lisp. There's clearly some piece of the magic that we're
missing.

Jamie

--
Jamison Hope
The PTR Group
www.theptrgroup.com






reply via email to

[Prev in Thread] Current Thread [Next in Thread]