From: Christophe Rhodes Date: Tue, 11 Mar 2003 10:14:12 +0000 (+0000) Subject: 0.7.13.23: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=3f82b95d9a0e29d8c6b218ce16447e2bc2e93351;p=sbcl.git 0.7.13.23: Add forgotten generic/array.lisp holding definitions of (ARRAY NIL) handling (thanks to APD for noting my oversight) --- diff --git a/src/compiler/generic/array.lisp b/src/compiler/generic/array.lisp new file mode 100644 index 0000000..6d79907 --- /dev/null +++ b/src/compiler/generic/array.lisp @@ -0,0 +1,53 @@ +;;;; generic array operations + +;;;; This software is part of the SBCL system. See the README file for +;;;; more information. +;;;; +;;;; This software is derived from the CMU CL system, which was +;;;; written at Carnegie Mellon University and released into the +;;;; public domain. The software is in the public domain and is +;;;; provided with absolutely no warranty. See the COPYING and CREDITS +;;;; files for more information. +(in-package "SB!VM") + +;;; (ARRAY NIL) stuff looks the same on all platforms +(define-vop (data-vector-ref/simple-array-nil) + (:translate data-vector-ref) + (:policy :fast-safe) + (:args (object :scs (descriptor-reg)) + (index :scs (unsigned-reg))) + (:arg-types simple-array-nil positive-fixnum) + (:results (value :scs (descriptor-reg))) + (:result-types *) + (:vop-var vop) + (:save-p :compute-only) + (:generator 1 + (error-call vop nil-array-accessed-error object))) + +;;; It shouldn't be possible to fall through to here in normal user +;;; code, as the system is smart enough to deduce that there must be +;;; an error upstream, as there are no objects of type NIL that can be +;;; stored in this data vector; however, just in case, we provide this +;;; translation, so that +;;; (LOCALLY +;;; (DECLARE (TYPE (SIMPLE-ARRAY NIL (*)) X) +;;; (OPTIMIZE (SPEED 3) (SAFETY 0))) +;;; (SB-KERNEL:DATA-VECTOR-SET X 3 'FOO)) +;;; signals the right kind of error. +(define-vop (data-vector-set/simple-array-nil) + (:translate data-vector-set) + (:policy :fast-safe) + (:args (object :scs (descriptor-reg)) + (index :scs (unsigned-reg)) + (value :scs (descriptor-reg))) + (:arg-types simple-array-nil positive-fixnum *) + (:results (value :scs (descriptor-reg))) + (:result-types *) + (:vop-var vop) + (:save-p :compute-only) + (:generator 1 + (error-call vop nil-array-accessed-error object))) + +;;; FIXME: There is probably plenty of other array stuff that looks +;;; the same or similar enough to be genericized. Do so, and move it +;;; here so that a new port doesn't need to do as much work. diff --git a/version.lisp-expr b/version.lisp-expr index 4995ac4..584b86f 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -18,4 +18,4 @@ ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.7.13.22" +"0.7.13.23"