Re: GSoC compiler work, SICL
Bruno Haible <[email protected]> Wed, 21 Mar 2018 23:50:04 +0100
| Newsgroups | gmane.lisp.clisp.devel |
|---|---|
| Message-ID | <5092263.x99zBNzZni@omega> |
Sam wrote:
> I think better handling of local functions in general would be a good
> improvement and a sizable project.
Yes. Note that this can go into different directions:
- Compiling local functions in a better way requires data-flow analysis;
this would be one outcome of the SICL work.
- Making local functions more debuggable, on the other hand, goes in the
opposite direction, as it prevents some optimizations. In my opinion,
this is much less work than a GSoC project (only ca. 2-4 weeks).
> Calling closures always conses (by calling copy-closure).
> Can this be eliminated?
> ...
> > Scheme-like optimizations.
>
> What is that?
This is what I meant. Based on data-flow analysis, the compiler may determine
that a local function is only used within the dynamic extent of the function
that defines it. Which means that the closure can be stack-allocated - no
consing.
There are surely more optimizations that a good Scheme compiler does, that
would apply in clisp as well.
Bruno
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
clisp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-devel