This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: GSOC | Extending Common Lisp support
On Jun 3, 2012, at 6:36 AM, Per Bothner wrote:
For what it's for worth: defvar is closer to define-variable
Good hint! That made me notice this line in define_variable.java:
tr.push(decl);
That's what's missing from defvar.java and defun.java
(define.java does it implicitly by creating the Declaration
with Translator#define).
With that added to both defvar and defun, now I'm down to this:
$ cat /tmp/namespaces.lisp
(defvar x "hello")
(defun x () 1)
(write (x)) (newline)
(write x) (newline)
(write #'x) (newline)
$ kawa /tmp/namespaces.lisp
/tmp/namespaces.lisp:5:8: warning - no declaration seen for x
1
"hello"
/tmp/namespaces.lisp:5:8: unbound location x (property (function))
at gnu.mapping.Location.get(Location.java:67)
at namespaces.run(namespaces.lisp:5)
at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:299)
at gnu.expr.CompiledModule.evalModule(CompiledModule.java:41)
at gnu.expr.CompiledModule.evalModule(CompiledModule.java:60)
at kawa.Shell.runFile(Shell.java:511)
at kawa.Shell.runFileOrClass(Shell.java:426)
at kawa.repl.main(repl.java:880)
So (function x) is still having trouble (I wouldn't be surprised if
this is also leading to your FLET weirdness, Charles), but the rest
seems to work.
--
Jamison Hope
The PTR Group
www.theptrgroup.com