From e3d1deb12cd9574909f896e3659796f5b1ddb182 Mon Sep 17 00:00:00 2001 From: gerd <gerd> Date: Mon, 3 Nov 2003 12:55:45 +0000 Subject: [PATCH] (defun lexical-symbol (symbol &optional prefix) (let* ((string (symbol-name symbol)) (length (length string))) (if (or (< length 3) (not (char= (elt string 0) #\*)) (not (char= (elt string (1- length)) #\*))) (error "Symbol does not follow dynamic conventions.") (if prefix (intern (cs prefix (subseq string 1 (1- length)))) (intern (subseq string 1 (1- length))))))) => spurious code deletion note that goes away when the local variable length is renamed to something else. * src/compiler/generic/vm-tran.lisp (subseq, copy-seq) <deftransform>: Use len as local variable name instead of cl:length. --- compiler/generic/vm-tran.lisp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/compiler/generic/vm-tran.lisp b/compiler/generic/vm-tran.lisp index 9eb24c879..47ea0b77e 100644 --- a/compiler/generic/vm-tran.lisp +++ b/compiler/generic/vm-tran.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/generic/vm-tran.lisp,v 1.46 2002/10/15 21:23:14 toy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/generic/vm-tran.lisp,v 1.47 2003/11/03 12:55:45 gerd Exp $") ;;; ;;; ********************************************************************** ;;; @@ -194,8 +194,8 @@ (deftransform subseq ((string start &optional (end nil)) (simple-string t &optional t)) - '(let* ((length (length string)) - (end (if end (min end length) length)) + '(let* ((len (length string)) + (end (if end (min end len) len)) (start (min start end)) (size (- end start)) (result (make-string size))) @@ -211,14 +211,14 @@ (deftransform copy-seq ((seq) (simple-string)) - '(let* ((length (length seq)) - (res (make-string length))) + '(let* ((len (length seq)) + (res (make-string len))) (declare (optimize (safety 0))) (bit-bash-copy seq vector-data-bit-offset res vector-data-bit-offset - (the index (* length vm:byte-bits))) + (the index (* len vm:byte-bits))) res)) -- GitLab