[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gcl-devel] Re: [Maxima] Requesting input on some possible low-level
From: |
Camm Maguire |
Subject: |
Re: [Gcl-devel] Re: [Maxima] Requesting input on some possible low-level changes |
Date: |
09 Sep 2003 15:08:50 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Greetings, and thanks for this! Problem is, that for the purposes of
the optimization in question, something can still be usefully done in
the (apply #'aref ...) et.al. cases (eg. add implicit (the fixnum ..)
to indices). I guess this cannot be completely implemented via
compiler-macros -- I'm wondering if there is a better way?
Take care,
Steve Haflich <address@hidden> writes:
> From: Camm Maguire <address@hidden>
>
> In any case, our define-compiler-macro appears to be lacking in at
> least one respect, namely it doesn't skip over 'funcall as required by
> the spec. I.e. (funcall #'foo ...) is not expanded. I have a fix to
> this which seems to be working. What I'd like to know, however, is if
> 'apply, 'map, and any other functions taking a function descriptor as
> an argument is also supposed to be expanded.
>
> No, the ANS only specifies that funcall be handled. Compiler macros
> should not be invoked for apply or mapping forms.
>
> A plausible reason for this is that for a compiler macro to be useful,
> in many situations it needs to know the number of arguments the
> operator will receive at run time, and for keyword args, it often
> wants to see the actual keyword arguments at compile time. (Compiler
> macros typically will punt if this information is not available to
> them.) There is no reasonable way to destructure an apply or map form
> against the `macro' lambda list of a compiler macro. For funcall it
> is quite practical.
>
> Note that the compiler macro receives the funcall form as its &whole
> (so that it can return it if it decides to decline to expand) but that
> the compiler is responsible for unravelling the funcall form so the
> compiler-macro's macro argument list is properly bound.
>
>
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/gcl-devel
>
>
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah
- [Gcl-devel] Re: [Maxima] Requesting input on some possible low-level changes, Camm Maguire, 2003/09/04
- [Gcl-devel] Re: [Maxima] Requesting input on some possible low-level changes, James Amundson, 2003/09/05
- [Gcl-devel] Re: [Maxima] Requesting input on some possible low-level changes, Camm Maguire, 2003/09/05
- [Gcl-devel] Re: [Maxima] Requesting input on some possible low-level changes, Vadim V. Zhytnikov, 2003/09/06
- [Gcl-devel] Re: [Maxima] Requesting input on some possible low-level changes, Vadim V. Zhytnikov, 2003/09/07
- [Gcl-devel] Re: [Maxima] Requesting input on some possible low-level changes, Wolfgang Jenkner, 2003/09/07
- Re: [Gcl-devel] Re: [Maxima] Requesting input on some possible low-level changes, Camm Maguire, 2003/09/08
- Re: [Gcl-devel] Re: [Maxima] Requesting input on some possible low-level changes, Steve Haflich, 2003/09/08
- Re: [Gcl-devel] Re: [Maxima] Requesting input on some possible low-level changes,
Camm Maguire <=
- Re: [Gcl-devel] Re: [Maxima] Requesting input on some possible low-level changes, Steve Haflich, 2003/09/10
- Re: [Gcl-devel] Re: [Maxima] Requesting input on some possible low-level changes, Camm Maguire, 2003/09/08