comparison src/ChangeLog @ 5272:66dbef5f8076

Be better about bounds-checking, #'subseq, #'fill; add same, #'reduce. 2010-09-16 Aidan Kehoe <kehoea@parhasard.net> * fns.c (Fsubseq): Change the string code to better fit in with the rest of this function (it still uses get_string_range_char(), though, which *may* diverge algorithmically from what we're doing). If dealing with a cons, only call #'length if we have reason to believe that the START and END arguments are badly specified, and check for circular lists ourselves when that's appropriate. If dealing with a vector, call Fvector() on the appropriate subset of the old vector's data directly, don't initialise the result with nil and then copy. (Ffill): Only check the range arguments for a cons SEQUENCE if we have good reason to think they were badly specified. (Freduce): Handle multiple values properly. Add bounds checking to this function, as specificied by ANSI Common Lisp.
author Aidan Kehoe <kehoea@parhasard.net>
date Thu, 16 Sep 2010 18:46:05 +0100
parents 5663ae9a8989
children 799742b751c8
comparison
equal deleted inserted replaced
5271:2def0d83a5e3 5272:66dbef5f8076
1 2010-09-16 Aidan Kehoe <kehoea@parhasard.net>
2
3 * fns.c (Fsubseq):
4 Change the string code to better fit in with the rest of this
5 function (it still uses get_string_range_char(), though, which *may*
6 diverge algorithmically from what we're doing).
7
8 If dealing with a cons, only call #'length if we have reason to
9 believe that the START and END arguments are badly specified, and
10 check for circular lists ourselves when that's appropriate.
11
12 If dealing with a vector, call Fvector() on the appropriate subset
13 of the old vector's data directly, don't initialise the result
14 with nil and then copy.
15
16 (Ffill):
17 Only check the range arguments for a cons SEQUENCE if we have good
18 reason to think they were badly specified.
19
20 (Freduce):
21 Handle multiple values properly. Add bounds checking to this
22 function, as specificied by ANSI Common Lisp.
23
1 2010-09-16 Aidan Kehoe <kehoea@parhasard.net> 24 2010-09-16 Aidan Kehoe <kehoea@parhasard.net>
2 25
3 * eval.c (Ffunction, Fquote): 26 * eval.c (Ffunction, Fquote):
4 Add argument information in the arguments: () format for these two 27 Add argument information in the arguments: () format for these two
5 special operators. 28 special operators.