chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] Add scrutiny special case for "append" [was: Re: [PATC


From: Peter Bex
Subject: [Chicken-hackers] Add scrutiny special case for "append" [was: Re: [PATCH] Fix list-ref type derivation for smashed lists [was: Re: [PATCH] A few small performance and scrutiny warning improvements to assignments]]
Date: Sun, 24 Jul 2016 20:40:16 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

On Sun, Jul 24, 2016 at 08:32:31PM +0200, Peter Bex wrote:
> The attached patch fixes this by only allowing this specialisation
> for lists that are known to be proper.  This means anything that
> ends with a smashed component, which is (or pair null), it will not
> be considered to be a known proper list, so the optimisation is skipped.

And here's another improvement, to track types of "append"'s arguments
into its return type.  It needs to be applied after the fix for the
list-ref specialisation, because it adds test cases that would otherwise
conflict (I think).

I'm having good hopes that this is a useful improvement, particularly
because quasiquoted forms will expand to "append" calls, so there will
be quite a few cases where semi-constant lists will get their types
known, which they didn't before.

There's one limitation: It doesn't know what to do when you append
an unknown (or smashed) list to something else.  I tried to come up
with something that's smart enough to merge a nested (pair ...) type
with a subsequent list argument, but I failed.  We can add this later,
though.

Cheers,
Peter

Attachment: 0001-Add-special-case-scrutiny-handling-for-append.chicken-5.patch
Description: Text Data

Attachment: 0001-Add-special-case-scrutiny-handling-for-append.master.patch
Description: Text Data

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]