From 95dbd03af309f57cc87f73c3c32ffba8b4ad33a0 Mon Sep 17 00:00:00 2001 From: Alexey Dejneka Date: Thu, 10 Feb 2005 04:23:08 +0000 Subject: [PATCH] 0.8.19.22: * Reduce consing for out-of-line AREF: declare SUBSCRIPTS argument for %ARRAY-ROW-MAYOR-INDEX be DYNAMIC-EXTENT. (reported by Baughn on #lisp) --- BUGS | 10 ++++++++++ src/code/array.lisp | 5 +++++ version.lisp-expr | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/BUGS b/BUGS index cac2152..b7270a2 100644 --- a/BUGS +++ b/BUGS @@ -2031,3 +2031,13 @@ WORKAROUND: point control word state and then returning the relevant float (most-positive-short-float or short-float-infinity) or signalling an error immediately would seem to make more sense. + +371: + SBCL 0.8.19 fails on + + (defvar *r* -7043009959286724629649270926654940933664689003233793014518979272497911394287216967075767325693021717277238746020477538876750544587281879084559996466844417586093291189295867052594478662802691926547232838591510540917276694295393715934079679531035912244103731582711556740654671309980075069010778644542022/670550434139267031632063192770201289106737062379324644110801846820471752716238484923370056920388400273070254958650831435834503195629325418985020030706879602898158806736813101434594805676212779217311897830937606064579213895527844045511878668289820732425014254579493444623868748969110751636786165152601) + + (let ((*print-base* 5) + (*read-base* 5) + (*print-radix* nil)) + (assert (= *r* (read-from-string (prin1-to-string *r*))))) diff --git a/src/code/array.lisp b/src/code/array.lisp index d3c09c1..4022e11 100644 --- a/src/code/array.lisp +++ b/src/code/array.lisp @@ -333,6 +333,7 @@ sb!vm:*specialized-array-element-type-properties*) #'> :key #'sb!vm:saetp-importance))))) +;;; SUBSCRIPTS has a dynamic-extent list structure and is destroyed (defun %array-row-major-index (array subscripts &optional (invalid-index-error-p t)) (declare (array array) @@ -383,14 +384,17 @@ t)) (defun array-row-major-index (array &rest subscripts) + (declare (dynamic-extent subscripts)) (%array-row-major-index array subscripts)) (defun aref (array &rest subscripts) #!+sb-doc "Return the element of the ARRAY specified by the SUBSCRIPTS." + (declare (dynamic-extent subscripts)) (row-major-aref array (%array-row-major-index array subscripts))) (defun %aset (array &rest stuff) + (declare (dynamic-extent stuff)) (let ((subscripts (butlast stuff)) (new-value (car (last stuff)))) (setf (row-major-aref array (%array-row-major-index array subscripts)) @@ -423,6 +427,7 @@ #!-sb-fluid (declaim (inline (setf aref))) (defun (setf aref) (new-value array &rest subscripts) + (declare (dynamic-extent subscripts)) (declare (type array array)) (setf (row-major-aref array (%array-row-major-index array subscripts)) new-value)) diff --git a/version.lisp-expr b/version.lisp-expr index bbb042e..1c85a50 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.8.19.21" +"0.8.19.22" -- 1.7.10.4