[Ecls-list] In LET/LET* bindings, the type of the form NIL is SYMBOL, not FIXNUM.

Gabriel Dos Reis gdr at integrable-solutions.net
Thu Jun 24 10:40:13 UTC 2010


On Thu, Jun 24, 2010 at 3:29 AM, Juan Jose Garcia-Ripoll
<juanjose.garciaripoll at googlemail.com> wrote:
> On Thu, Jun 24, 2010 at 9:56 AM, Gabriel Dos Reis
> <gdr at integrable-solutions.net> wrote:
>>
>> OpenAxiom generates more LET-forms with initialization, e.g.
>>
>>   (let ((a 3)) ...)
>> I hope ECL is taking advantage of that in its type propagation for
>> code generation purposes...
>
> It will not help unless A is either constant or it is declared to have type
> fixnum / double-float / single-float, etc

Aha.  OpenAxiom declares/proclaims function types.  Is there a way
ECL can use that information anyhow if a is never modified?  E.g.

   (declaim (ftype (function (double-float) cons) foo))
   (defun foo (x)
      (let ((y (truncate x))) (cons 1 y)))


-- Gaby




More information about the ecl-devel mailing list