X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fcross-sap.lisp;h=739fa1160deac405bc78e780906be94015cdd402;hb=c47519c9e63fd32a635943a84ec13d8a60d95f08;hp=2ef9f244f1d120e11d9b0483ef230cf778f2fae5;hpb=cea4896b2482b7b2b429c1631d774b4cfbc0efba;p=sbcl.git diff --git a/src/code/cross-sap.lisp b/src/code/cross-sap.lisp index 2ef9f24..739fa11 100644 --- a/src/code/cross-sap.lisp +++ b/src/code/cross-sap.lisp @@ -15,15 +15,16 @@ ;;; SYSTEM-AREA-POINTER is not a primitive type in ANSI Common Lisp, ;;; so we need a compound type to represent it in the host Common Lisp ;;; at cross-compile time: -(defstruct (system-area-pointer (:constructor make-sap) (:conc-name "SAP-")) +(defstruct (system-area-pointer (:constructor make-sap) + (:conc-name "SAP-")) ;; the integer representation of the address - (int (error "missing SAP-INT argument") :type sap-int-type :read-only t)) + (int (error "missing SAP-INT argument") :type sap-int :read-only t)) ;;; cross-compilation-host analogues of target-CMU CL primitive SAP operations (defun int-sap (int) (make-sap :int int)) (defun sap+ (sap offset) - (declare (type system-area-pointer sap) (type sap-int-type offset)) + (declare (type system-area-pointer sap) (type sap-int offset)) (make-sap :int (+ (sap-int sap) offset))) #.`(progn ,@(mapcar (lambda (info) @@ -32,9 +33,10 @@ (,int-fun (sap-int x) (sap-int y))))) '((sap< <) (sap<= <=) (sap= =) (sap>= >=) (sap> >) (sap- -)))) -;;; dummies, defined so that we can declare they never return and thereby -;;; eliminate a thundering herd of optimization notes a la "can't optimize this -;;; expression because we don't know the return type of SAP-REF-8" +;;; dummies, defined so that we can declare they never return and +;;; thereby eliminate a thundering herd of optimization notes along +;;; the lines of "can't optimize this expression because we don't know +;;; the return type of SAP-REF-8" (defun sap-ref-stub (name) (error "~S doesn't make sense on cross-compilation host." name)) #.`(progn @@ -44,7 +46,7 @@ (defun ,name (sap offset) (declare (ignore sap offset)) (sap-ref-stub ',name)) - ,@(let ((setter-stub (gensym "SAP-SETTER-STUB-"))) + ,@(let ((setter-stub (gensym "SETTER-STUB-"))) `((defun ,setter-stub (foo sap offset) (declare (ignore foo sap offset)) (sap-ref-stub '(setf ,name)))