Skip to content
Snippets Groups Projects
Commit 71e435b4 authored by gerd's avatar gerd
Browse files

* src/compiler/array-tran.lisp (svref, schar, char): Define

	source transforms so that they don't accept more than one
	index, for better error messages.
parent adab5ee5
No related branches found
No related tags found
No related merge requests found
......@@ -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/array-tran.lisp,v 1.32 2003/04/13 11:57:17 gerd Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/array-tran.lisp,v 1.33 2003/04/27 11:43:43 gerd Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -542,12 +542,23 @@
(if (byte-compiling)
(values nil t)
`(%aset (the ,',type ,a) ,@i))))))
(frob svref %svset simple-vector)
(frob schar %scharset simple-string)
(frob char %charset string)
(frob sbit %sbitset (simple-array bit))
(frob bit %bitset (array bit)))
(macrolet ((frob (reffer setter type)
`(progn
(def-source-transform ,reffer (a i)
(if (byte-compiling)
(values nil t)
`(aref (the ,',type ,a) ,i)))
(def-source-transform ,setter (a i v)
(if (byte-compiling)
(values nil t)
`(%aset (the ,',type ,a) ,i ,v))))))
(frob svref %svset simple-vector)
(frob schar %scharset simple-string)
(frob char %charset string))
;;; AREF, %ASET -- transform.
;;;
;;; Convert into a data-vector-ref (or set) with the set of indices replaced
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment