From b15e772d106cf8f87c464c7b950df8daf1472a42 Mon Sep 17 00:00:00 2001 From: ram <ram> Date: Tue, 9 Oct 1990 14:21:38 +0000 Subject: [PATCH] Changed the ELT and %SETELT transforms to only change to AREF when we know we have a non-complex vector. This ensures that ELT bound checking will respect the fill pointer. --- compiler/seqtran.lisp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/seqtran.lisp b/compiler/seqtran.lisp index 93e502996..78231bf54 100644 --- a/compiler/seqtran.lisp +++ b/compiler/seqtran.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman (FAHLMAN@CMUC). ;;; ********************************************************************** ;;; -;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/seqtran.lisp,v 1.9 1990/08/24 18:29:34 wlott Exp $ +;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/seqtran.lisp,v 1.10 1990/10/09 14:21:38 ram Exp $ ;;; ;;; This file contains optimizers for list and sequence functions. ;;; @@ -70,13 +70,13 @@ (def-source-transform mapcon (function list &rest more-lists) (mapper-transform function (cons list more-lists) :nconc nil)) -(deftransform elt ((s i) (vector *)) +(deftransform elt ((s i) ((simple-array * (*)) *)) '(aref s i)) (deftransform elt ((s i) (list *)) '(nth i s)) -(deftransform %setelt ((s i v) (vector * *)) +(deftransform %setelt ((s i v) ((simple-array * (*)) * *)) '(%aset s i v)) (deftransform %setelt ((s i v) (list * *)) -- GitLab