From: Stas B. <sta...@gm...> - 2017-07-17 12:31:22
|
Also, always transforming makes it quite larger, 89 bytes vs 30 for a full call. And there is really no way to restrict that, due to the known declaration. And the error changes from #(A B C) is not an array with a fill pointer. to The value #(A B C) is not of type (AND VECTOR (NOT SIMPLE-ARRAY)) On Mon, Jul 17, 2017 at 3:19 PM, Douglas Katzman via Sbcl-commits <sbc...@li...> wrote: > The branch "master" has been updated in SBCL: > via 5a31f05ed1ab75c3bc8ca9c0559ec76d409982c4 (commit) > from 4fc6d2eb98d551727c7a361fde6e0a5ecd08584f (commit) > > - Log ----------------------------------------------------------------- > commit 5a31f05ed1ab75c3bc8ca9c0559ec76d409982c4 > Author: Douglas Katzman <do...@go...> > Date: Mon Jul 17 08:19:14 2017 -0400 > > Simplify %SET-FILL-POINTER transform > --- > src/compiler/array-tran.lisp | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/src/compiler/array-tran.lisp b/src/compiler/array-tran.lisp > index 7a9185e..4052216 100644 > --- a/src/compiler/array-tran.lisp > +++ b/src/compiler/array-tran.lisp > @@ -1296,12 +1296,8 @@ > "The array type is ambiguous; must call ~ > ARRAY-HAS-FILL-POINTER-P at runtime."))))))) > > -(deftransform %set-fill-pointer ((vector fill-pointer) (vector (eql 0))) > - (or (let ((type (lvar-type vector))) > - (when (and (= (length (array-type-dimensions-or-give-up type)) 1) > - (eq (conservative-array-type-complexp type) t)) > - `(setf (%array-fill-pointer vector) 0))) > - (give-up-ir1-transform))) > +(deftransform %set-fill-pointer ((vector fill-pointer) (complex-vector (eql 0))) > + `(setf (%array-fill-pointer vector) 0)) > > (deftransform check-bound ((array dimension index) * * :node node) > ;; This is simply to avoid multiple evaluation of INDEX by the > > ----------------------------------------------------------------------- > > > hooks/post-receive > -- > SBCL > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Sbcl-commits mailing list > Sbc...@li... > https://lists.sourceforge.net/lists/listinfo/sbcl-commits -- With best regards, Stas. |