[Ecls-list] Type propagation

Alexander Gavrilov angavrilov at gmail.com
Thu Aug 12 08:22:02 UTC 2010


> On Wed, Aug 11, 2010 at 5:29 PM, Alexander Gavrilov <angavrilov at gmail.com>wrote:
> 
> > Hi, I've finally got around to this, and after some investigation
> > implemented it using the static constant facility in cmpwt.lsp
> > instead:
> 
> There are two problems with the static constant facility.
> 
> 1) Not all compilers allow initialization of global constants in a
> complicated way. MSVC chokes on many of the expressions we produce for lisp
> constants.

Which expressions exactly are they? Maybe they can be
fixed to be more compatible, or something?

> 2) Static constants are not allocated in the heap. That is a huge problem I
> did not realize until recently, because if a constant in a loaded file is
> still referenced _after_ the binary file is garbage collected and unloaded,
> then we have a problem. I am looking for a solution, but currently it seems
> disabling static constants is the only possibility.

If the values are immediately unboxed anyway (as should be
the case with SSE packs), that would never be the problem.
Again, maybe it is possible to dynamically restrict this
feature to cases where the boxed form is not actually used?

Static constants produce the fastest possible access code,
so I was actually considering implementing something like
them for SSE before I found that it was already done.

I wonder if it also might make sense to produce a style
warning when the compiler has to box SSE values. After
all, it eats away all performance gains, and really
shouldn't happen at all outside REPL & interpreted code.

Alexander




More information about the ecl-devel mailing list