[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] add special case in specialization for lis
Re: [Chicken-hackers] [PATCH] add special case in specialization for list-ref/list-tail
Thu, 15 Dec 2011 21:13:35 +0100
On Thu, Dec 15, 2011 at 02:50:16AM -0500, Felix wrote:
> The attached patch adds special cases for list-ref and list-tail
> to the scrutinizer to obtain more precise result-type information
> when the index argument is a constant (and the list argument
> is of a known fixed-length list type).
Does this happen often enough to warrant this much special-casing?
I don't see any fixed (list X Y Z ...) returntypes in a quick glance
And if this is done, shouldn't (##sys#)c[ad]*r have the same kind of
specialization for fixed-length lists?
Speaking of c[ad]*r, what about known fixed-length (pair (pair ...)) types?
It looks like this patch for list-ref/list-tail doesn't deal with those.
(sorry for being obnoxious)
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth