[armedbear-devel] compiler problem
Alan Ruttenberg
alanruttenberg at gmail.com
Wed Jan 6 23:02:02 UTC 2010
On Wed, Jan 6, 2010 at 5:12 PM, Erik Huelsmann <ehuels at gmail.com> wrote:
> Hi Alan,
>
> On Wed, Jan 6, 2010 at 6:04 PM, Erik Huelsmann <ehuels at gmail.com> wrote:
>
>> I can see the error shown by the symbol-macrolet in the precompiler sources:
>>
>> 572 (defun precompile-lambda (form)
>> 573 (let ((body (cddr form))
>> 574 (precompiled-lambda-list
>> 575 (precompile-lambda-list (cadr form)))
>> 576 (*inline-declarations* *inline-declarations*))
>> 577 (process-optimization-declarations body)
>> 578 (list* 'LAMBDA precompiled-lambda-list
>> 579 (mapcar #'precompile1 body))))
>>
>>
>> Before going on to process the lambda body statements in line 579,
>> precompile-lambda should establish variables from the lambda list
>> shadowing the symbol-macrolet...
>
> The error turned out to be in PRECOMPILE-LAMBDA and
> PRECOMPILE-NAMED-LAMBDA. Committed the fix in r12340 in trunk. This
> will be in 0.18.
>
> I think it would be a good idea to extend your inline-lambda-rewriter
> to be able to parse/rewrite all lambda lists, not only the ones with
> &rest arguments (did I see correctly that you restricted to that
> case?).
I did, for expediency. I don't know whether it will be worth doing it
for all lambda lists, and full lambda list processing is complicated.
I know that my code was using these forms - it might be worth seeing
whether there are any uses of more complicated forms. At some point
the additional cost of doing the lambda list processing relative to
the extra function call might not be worth it.
Don't mind doing a bit more on it if there are known cases that would benefit.
-Alan
>
> Bye,
>
> Erik.
>
More information about the armedbear-devel
mailing list