X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Farray.lisp;h=817bdb783c80e0e68733a28ea48910598024f6ff;hb=ee90e535c985f697c71d839083aed16710f846fd;hp=d569ad4d410f97f98f3fb9d5e95c9db6e74aeecd;hpb=ea3a2433c72ee97c5691c29d882a63e4d86f0a32;p=sbcl.git diff --git a/src/code/array.lisp b/src/code/array.lisp index d569ad4..817bdb7 100644 --- a/src/code/array.lisp +++ b/src/code/array.lisp @@ -56,15 +56,6 @@ (values vector index)) (values array index))) -(defun %simple-vector-compare-and-swap (vector index old new) - #!+(or x86 x86-64) - (%simple-vector-compare-and-swap vector index old new) - #!-(or x86 x86-64) - (let ((n-old (svref vector index))) - (when (eq old n-old) - (setf (svref vector index) new)) - n-old)) - ;;; It'd waste space to expand copies of error handling in every ;;; inline %WITH-ARRAY-DATA, so we have them call this function ;;; instead. This is just a wrapper which is known never to return. @@ -346,11 +337,7 @@ of specialized arrays is supported." (:little-endian (- sb!vm:other-pointer-lowtag)) (:big-endian - ;; I'm not completely sure of what this - ;; 3 represents symbolically. It's - ;; just what all the LOAD-TYPE vops - ;; are doing. - (- 3 sb!vm:other-pointer-lowtag))))) + (- (1- sb!vm:n-word-bytes) sb!vm:other-pointer-lowtag))))) ;; WIDETAG-OF needs extra code to handle ;; LIST and FUNCTION lowtags. We're only ;; dispatching on other pointers, so let's @@ -482,6 +469,9 @@ of specialized arrays is supported." (defun data-vector-ref (array index) (hairy-data-vector-ref array index)) +(defun data-vector-ref-with-offset (array index offset) + (hairy-data-vector-ref array (+ index offset))) + ;;; SUBSCRIPTS has a dynamic-extent list structure and is destroyed (defun %array-row-major-index (array subscripts &optional (invalid-index-error-p t))