X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fdlisp2.lisp;h=433832b9006f5728c766998bbfb5a3a961e03b7c;hb=22aec7852f4861e5dab28cc0d619c24b62590dad;hp=b192fe64f5b1f490d148dc8195b2fc0e170e7a30;hpb=ed7ba4dad8a79726fdfeba5aa12e276ea852c540;p=sbcl.git diff --git a/src/pcl/dlisp2.lisp b/src/pcl/dlisp2.lisp index b192fe6..433832b 100644 --- a/src/pcl/dlisp2.lisp +++ b/src/pcl/dlisp2.lisp @@ -39,7 +39,14 @@ (emit-reader/writer-macro :writer 1 nil))) (2 (if class-slot-p (emit-reader/writer-macro :writer 2 t) - (emit-reader/writer-macro :writer 2 nil)))))) + (emit-reader/writer-macro :writer 2 nil))))) + (:boundp (ecase 1-or-2-class + (1 (if class-slot-p + (emit-reader/writer-macro :boundp 1 t) + (emit-reader/writer-macro :boundp 1 nil))) + (2 (if class-slot-p + (emit-reader/writer-macro :boundp 2 t) + (emit-reader/writer-macro :boundp 2 nil)))))) nil)) (defun emit-one-or-n-index-reader/writer-function @@ -59,25 +66,20 @@ (emit-one-or-n-index-reader/writer-macro :writer t nil)) (if class-slot-p (emit-one-or-n-index-reader/writer-macro :writer nil t) - (emit-one-or-n-index-reader/writer-macro :writer nil nil))))) + (emit-one-or-n-index-reader/writer-macro :writer nil nil)))) + (:boundp (if cached-index-p + (if class-slot-p + (emit-one-or-n-index-reader/writer-macro :boundp t t) + (emit-one-or-n-index-reader/writer-macro :boundp t nil)) + (if class-slot-p + (emit-one-or-n-index-reader/writer-macro :boundp nil t) + (emit-one-or-n-index-reader/writer-macro :boundp nil nil))))) nil)) -;;; Note this list is setup in dlisp3.lisp when all the necessary -;;; macros have been loaded. -(defvar *checking-or-caching-function-list* nil) - -(defmacro emit-checking-or-caching-function-precompiled () - `(cdr (assoc (list cached-emf-p return-value-p metatypes applyp) - *checking-or-caching-function-list* - :test #'equal))) - (defun emit-checking-or-caching-function (cached-emf-p return-value-p metatypes applyp) - (let ((fn (emit-checking-or-caching-function-precompiled))) - (if fn - (values fn nil) - (values (emit-checking-or-caching-function-preliminary - cached-emf-p return-value-p metatypes applyp) - t)))) + (values (emit-checking-or-caching-function-preliminary + cached-emf-p return-value-p metatypes applyp) + t)) (defvar *not-in-cache* (make-symbol "not in cache")) @@ -87,7 +89,7 @@ (if cached-emf-p (lambda (cache miss-fn) (declare (type function miss-fn)) - #'(sb-kernel:instance-lambda (&rest args) + #'(instance-lambda (&rest args) (declare #.*optimize-speed*) (with-dfun-wrappers (args metatypes) (dfun-wrappers invalid-wrapper-p) @@ -102,7 +104,7 @@ (invoke-emf emf args)))))))) (lambda (cache emf miss-fn) (declare (type function miss-fn)) - #'(sb-kernel:instance-lambda (&rest args) + #'(instance-lambda (&rest args) (declare #.*optimize-speed*) (with-dfun-wrappers (args metatypes) (dfun-wrappers invalid-wrapper-p)