GSOC | Extending Common Lisp support

Charles Turner chturne@gmail.com
Mon Jun 4 22:56:00 GMT 2012


Jamison, that patch fixed the function space lookup issues I was
having, thanks! But I've been puzzling over a follow-up namespace
related problem. Hopefully with all that information loaded into your
head, you might be able to throw some clues my way :-)

(defun dummy () 'top-level)
(funcall #'dummy) ;=> top-level
(flet ((dummy () 'shadow))
  (funcall #'dummy)) ;=> shadow
(funcall #'dummy) ;=> shadow

Line 1 does a

lexical.push: Declaration[dummy/2]

and when I do a decl.setProcedureDecl(true) on the flet'ed function
line 3, I'm fiddling with a Declaration[dummy/39], so definitely a
different object, and it's in a new scope (a new LetExp), which gets
popped after FLET's extent.

The call to FUNCTION inside the FLET correctly looks up dummy/39, and
outside the FLET, correctly looks up dummy/2, so how is dummy/2's
function binding getting changed? Any clues on where I might find a
smoking gun?

> Good thing we've got Charles around to figure everything out for us now!

Can I have his email address? I could use someone like that! :-)

Regards,
Charles.



More information about the Kawa mailing list