[Ecls-list] Re: Latest changes

Juan Jose Garcia Ripoll jlr at mpq.mpg.de
Sat Aug 14 00:12:03 UTC 2004


Paul F. Dietz wrote:

> Juan Jose Garcia Ripoll wrote:
>
>> + Some fixes in the compiler. I am still working on some major issues 
>> regarding LABELS/FLET, which is the reason why there will not be a 
>> release this summer.
>
> Is the gcl random test proving useful in testing this? 

Definitively. First I thought there were only minor issues, but I have 
discovered that the old compiler, which was thought for a very 
straightforward compilation ala GCL (i.e. all functions are closures, 
and there is only one class of environment), does not handle well 
situations as the following one:
(lambda (a b c)
    (flet ((f1 () a))
        (flet ((f2 ...
               (flet ((f3 ...
                   (f1)))
              (mapcar #'f2 ...)))
The compiler, as of now, finds F1 and decides that it needs no closure, 
because the variables it accesses are just "lexically" closed and they 
can be accessed via a pointer that the function receives. However, after 
processing the second flet, the compiler should notice that F1 is 
invoked from within a closure (F2), and thus the references to the 
variables A, B, C, etc, cannot be done by a mere "pointer", but rather 
these variables must form part of a real full-fledge environment.

Your tests, fortunately, is full of funny code like this ;-) Thanks a 
lot for your work on it.

Regards,

Juanjo

-- 
Max-Planck-Institut fuer Quantenoptik	+49/(0)89/32905-345
Hans-Kopfermann-Str. 1, D-85748		www.mpq.mpg.de/Theorygroup/CIRAC/
Garching b. Muenchen, Germany		Juan.Ripoll at mpq.mpg.de






More information about the ecl-devel mailing list