X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fdefsetfs.lisp;h=af7d31e95d6ba53388d686b03d735dba8ab3f322;hb=7f1e94ae961a198e00daf281eb1dc858e5b2dcc7;hp=6b8f261b5b79d3e4610f37c7949805909b59876d;hpb=a530bbe337109d898d5b4a001fc8f1afa3b5dc39;p=sbcl.git diff --git a/src/code/defsetfs.lisp b/src/code/defsetfs.lisp index 6b8f261..af7d31e 100644 --- a/src/code/defsetfs.lisp +++ b/src/code/defsetfs.lisp @@ -12,9 +12,6 @@ ;;;; provided with absolutely no warranty. See the COPYING and CREDITS ;;;; files for more information. -(sb!int:file-comment - "$Header$") - (sb!int:/show0 "entering defsetfs.lisp") ;;; from alieneval.lisp @@ -42,22 +39,25 @@ ;;; from defstruct.lisp (in-package "SB!KERNEL") (defsetf %instance-ref %instance-set) -(defsetf %raw-ref-single %raw-set-single) -(defsetf %raw-ref-double %raw-set-double) -#!+long-float -(defsetf %raw-ref-long %raw-set-long) -(defsetf %raw-ref-complex-single %raw-set-complex-single) -(defsetf %raw-ref-complex-double %raw-set-complex-double) -#!+long-float -(defsetf %raw-ref-complex-long %raw-set-complex-long) + +(defsetf %raw-instance-ref/word %raw-instance-set/word) +(defsetf %raw-instance-ref/single %raw-instance-set/single) +(defsetf %raw-instance-ref/double %raw-instance-set/double) +(defsetf %raw-instance-ref/complex-single %raw-instance-set/complex-single) +(defsetf %raw-instance-ref/complex-double %raw-instance-set/complex-double) + (defsetf %instance-layout %set-instance-layout) (defsetf %funcallable-instance-info %set-funcallable-instance-info) +(defsetf %funcallable-instance-layout %set-funcallable-instance-layout) ;;; from early-setf.lisp (in-package "SB!IMPL") -;;; KLUDGE: Various of these (e.g. AREF and BIT) have DEFUN (SETF FOO) versions -;;; too. Do we really need both? -- WHN 19990921 +;;; (setf aref/bit/sbit) are implemented using setf-functions, +;;; because they have to work with (setf (apply #'aref array subscripts)) +;;; All other setfs can be done using setf-functions too, but I +;;; haven't found technical advantages or disatvantages for either +;;; scheme. #-sb-xc-host (defsetf car %rplaca) #-sb-xc-host (defsetf cdr %rplacd) #-sb-xc-host (defsetf caar (x) (v) `(%rplaca (car ,x) ,v)) @@ -100,49 +100,43 @@ #-sb-xc-host (defsetf tenth (x) (v) `(%rplaca (cdr (cddddr (cddddr ,x))) ,v)) #-sb-xc-host (defsetf rest %rplacd) #-sb-xc-host (defsetf elt %setelt) -#-sb-xc-host (defsetf aref %aset) #-sb-xc-host (defsetf row-major-aref %set-row-major-aref) #-sb-xc-host (defsetf svref %svset) #-sb-xc-host (defsetf char %charset) -#-sb-xc-host (defsetf bit %bitset) #-sb-xc-host (defsetf schar %scharset) -#-sb-xc-host (defsetf sbit %sbitset) (defsetf %array-dimension %set-array-dimension) -(defsetf sb!kernel:%raw-bits sb!kernel:%set-raw-bits) +(defsetf sb!kernel:%vector-raw-bits sb!kernel:%set-vector-raw-bits) #-sb-xc-host (defsetf symbol-value set) -#-sb-xc-host (defsetf symbol-function fset) +#-sb-xc-host (defsetf symbol-global-value set-symbol-global-value) #-sb-xc-host (defsetf symbol-plist %set-symbol-plist) #-sb-xc-host (defsetf nth %setnth) #-sb-xc-host (defsetf fill-pointer %set-fill-pointer) -(defsetf search-list %set-search-list) (defsetf sap-ref-8 %set-sap-ref-8) (defsetf signed-sap-ref-8 %set-signed-sap-ref-8) (defsetf sap-ref-16 %set-sap-ref-16) (defsetf signed-sap-ref-16 %set-signed-sap-ref-16) (defsetf sap-ref-32 %set-sap-ref-32) (defsetf signed-sap-ref-32 %set-signed-sap-ref-32) -#!+alpha (defsetf sap-ref-64 %set-sap-ref-64) -#!+alpha (defsetf signed-sap-ref-64 %set-signed-sap-ref-64) +(defsetf sap-ref-64 %set-sap-ref-64) +(defsetf signed-sap-ref-64 %set-signed-sap-ref-64) +(defsetf sap-ref-word %set-sap-ref-word) +(defsetf signed-sap-ref-word %set-signed-sap-ref-word) (defsetf sap-ref-sap %set-sap-ref-sap) +(defsetf sap-ref-lispobj %set-sap-ref-lispobj) (defsetf sap-ref-single %set-sap-ref-single) (defsetf sap-ref-double %set-sap-ref-double) #!+long-float (defsetf sap-ref-long %set-sap-ref-long) #-sb-xc-host (defsetf subseq (sequence start &optional (end nil)) (v) - `(progn (replace ,sequence ,v :start1 ,start :end1 ,end) - ,v)) + `(progn (replace ,sequence ,v :start1 ,start :end1 ,end) + ,v)) ;;; from fdefinition.lisp (in-package "SB!IMPL") #-sb-xc-host (defsetf fdefinition %set-fdefinition) -;;; from filesys.lisp -(in-package "SB!IMPL") -(defsetf default-directory %set-default-directory) - ;;; from kernel.lisp (in-package "SB!KERNEL") (defsetf code-header-ref code-header-set) -(defsetf %raw-bits %set-raw-bits) ;;; from serve-event.lisp (in-package "SB!IMPL") @@ -150,14 +144,6 @@ #!+sb-doc "Set the handler function for an object set operation.") -;;; from unix.lisp -(in-package "SB!UNIX") -(defsetf tty-process-group (&optional fd) (pgrp) - #!+sb-doc - "Set the tty-process-group for the unix file-descriptor FD to PGRP. If not - supplied, FD defaults to /dev/tty." - `(%set-tty-process-group ,pgrp ,fd)) - ;;; from x86-vm.lisp (in-package "SB!VM") (defsetf context-register %set-context-register)