Re: master: Add remark about a COPY-LIST added in b1b08c0929
Stas Boukarev <[email protected]>
| Newsgroups | gmane.lisp.steel-bank.cvs,gmane.lisp.steel-bank.devel |
|---|---|
| Message-ID | <CAF63=12HOr_Bd1bQhuNBfbXb-7Pr+9-JWqjvX-NxrV9xnguFLQ@mail.gmail.com> |
Is that really not evident? The standard says specifically that the result might be shared or identical. On Wed, Dec 3, 2025 at 6:07 PM snuglas via Sbcl-commits <[email protected]> wrote: > > The branch "master" has been updated in SBCL: > via 29e61e224daea797fa617556cc316ab8e8cf4a16 (commit) > from a7733b43c7a1e6a18f3f71566451ecbff491687c (commit) > > - Log ----------------------------------------------------------------- > commit 29e61e224daea797fa617556cc316ab8e8cf4a16 > Author: Douglas Katzman <[email protected]> > Date: Wed Dec 3 09:59:09 2025 -0500 > > Add remark about a COPY-LIST added in b1b08c0929 > --- > src/compiler/assem.lisp | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/src/compiler/assem.lisp b/src/compiler/assem.lisp > index b2e5c8197..1ca11e6d7 100644 > --- a/src/compiler/assem.lisp > +++ b/src/compiler/assem.lisp > @@ -455,6 +455,10 @@ > (#+sb-xc-host cl:macroexpand-1 > #-sb-xc-host %macroexpand-1 '..inherited-labels.. env) > (if expanded expansion))) > + ;; REMOVE-IF-NOT can tail-share with its input. For example: > + ;; * (defvar form '((inst add x y) ok (progn) done)) > + ;; * (sort (remove-if-not #'atom form) #'string<) => (DONE OK) > + ;; * form => ((INST ADD X Y) OK (PROGN) OK) ; mutated by SORT > (new-labels (sort (copy-list (remove-if-not #'label-name-p body)) #'string<))) > ;; Compare for dups using STRING=. Two reasons to use that rather than EQ: > ;; (1) the assembler input is generally string-like - consider that instruction > > ----------------------------------------------------------------------- > > > hooks/post-receive > -- > SBCL > > > _______________________________________________ > Sbcl-commits mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/sbcl-commits _______________________________________________ Sbcl-commits mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sbcl-commits