Re: quote vs load-time-value in compile-file
- From: Christophe Rhodes <csr21@xxxxxxxxx>
- Date: Wed, 20 Sep 2006 14:51:00 +0100
"Jerry Boetje" <jboetje@xxxxxxxxxxx> writes:
I've been working on the CLforJava compiler, and I've come upon an
interesting question while (file) compiling the QUOTE form. If I find
the form '(a b c), I have to generate code to reconstitute the quoted
list - something like (list (intern "A") (intern "B") (intern "C")).
Life gets more interesting if I have a quoted list that looks like '(a
#.(make-foo :x 2 :y 3) b). This of course is supposed to reconstituted
to (a #s(FOO :x 2 :y 3) b).
Only in the presence of a suitable definition for MAKE-LOAD-FORM.
So again I have to create code to re-create
this, say (list (intern "A") (make-foo :x 2 :y 3) (intern "B")).
But this seems that, in the compilation environment, I could transform
the '(a b) form into (load-time-value (list (intern "A") (intern "B")).
I'd love to morph quote into l-t-v. But am I missing some particular
sematics? thanks for the assist.
I think that understanding MAKE-LOAD-FORM will probably clear up the
issue that you have. Basically, it's the user's responsibility to
tell the compiler how to dump literal objects.
Christophe
.
- References:
- quote vs load-time-value in compile-file
- From: Jerry Boetje
- quote vs load-time-value in compile-file
- Prev by Date: common-lisp.net issues: frequent reboots.
- Next by Date: Re: Redoing Matlisp?
- Previous by thread: quote vs load-time-value in compile-file
- Next by thread: common-lisp.net issues: frequent reboots.
- Index(es):
Relevant Pages
|