0.8.20.6:
[sbcl.git] / src / pcl / dlisp2.lisp
index b192fe6..433832b 100644 (file)
                       (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
                      (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)
                            (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)