From 9d7bfe2e755ab75fa31603f1ce86d66b349bf030 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Mon, 28 Apr 2003 09:53:01 +0000 Subject: [PATCH] 0.pre8.114: CHAR, SCHAR and SVREF act on vectors, not multidimensional arrays ... so make the source-transform aware of that, for early error reporting (observation from Gerd Moellmann) --- NEWS | 3 ++- src/compiler/array-tran.lisp | 12 +++++++++--- version.lisp-expr | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 386e5df..65f9ff5 100644 --- a/NEWS +++ b/NEWS @@ -1673,7 +1673,7 @@ changes in sbcl-0.8.0 relative to sbcl-0.7.14 TYPEP the latter but not the former. * compiler issues a full WARNING on calling of an undefined function with a name from the CL package. - * MAP-INTO for a vector destination is open coded. (reported by + * MAP-INTO for a vector destination is open coded. (reported by Brian Downing on c.l.l) * fixed some bugs revealed by Paul Dietz' test suite: ** COPY-ALIST now signals an error if its argument is a dotted @@ -1700,6 +1700,7 @@ changes in sbcl-0.8.0 relative to sbcl-0.7.14 in question is unbound; ** optimized MAKE-INSTANCE functions no longer cause internal assertion failures in the presence of duplicate initargs; + ** SLOT-MAKUNBOUND returns the instance acted upon, not NIL; planned incompatible changes in 0.8.x: * (not done yet, but planned:) When the profiling interface settles diff --git a/src/compiler/array-tran.lisp b/src/compiler/array-tran.lisp index a384a6c..5f1a28d 100644 --- a/src/compiler/array-tran.lisp +++ b/src/compiler/array-tran.lisp @@ -689,11 +689,17 @@ `(aref (the ,',type ,a) ,@i)) (define-source-transform ,setter (a &rest i) `(%aset (the ,',type ,a) ,@i))))) - (define-frob svref %svset simple-vector) - (define-frob schar %scharset simple-string) - (define-frob char %charset string) (define-frob sbit %sbitset (simple-array bit)) (define-frob bit %bitset (array bit))) +(macrolet ((define-frob (reffer setter type) + `(progn + (define-source-transform ,reffer (a i) + `(aref (the ,',type ,a) ,i)) + (define-source-transform ,setter (a i v) + `(%aset (the ,',type ,a) ,i ,v))))) + (define-frob svref %svset simple-vector) + (define-frob schar %scharset simple-string) + (define-frob char %charset string)) (macrolet (;; This is a handy macro for computing the row-major index ;; given a set of indices. We wrap each index with a call diff --git a/version.lisp-expr b/version.lisp-expr index bd4502f..6653b46 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.pre8.113" +"0.pre8.114" -- 1.7.10.4