mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-03-09 22:50:34 -07:00
Slight optimization of nreconc, removing a redundant check for Null.
This commit is contained in:
parent
12c93e87b9
commit
322307272c
1 changed files with 2 additions and 3 deletions
|
|
@ -580,15 +580,14 @@ cl_nreconc(cl_object l, cl_object y)
|
|||
/* INV: when a circular list is "reconc'ed", the pointer ends
|
||||
up at the beginning of the original list, hence we need no
|
||||
slow pointer */
|
||||
for (x = l; CONSP(x); ) {
|
||||
for (x = l; !Null(x); ) {
|
||||
if (!LISTP(x)) FEtype_error_list(x);
|
||||
z = x;
|
||||
x = ECL_CONS_CDR(x);
|
||||
if (x == l) FEcircular_list(l);
|
||||
ECL_RPLACD(z, y);
|
||||
y = z;
|
||||
}
|
||||
if (x != Cnil)
|
||||
FEtype_error_list(x);
|
||||
@(return y)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue