-;;;; very low-level representation of instances with meta-class
-;;;; STANDARD-CLASS
-
-;;; FIXME: more than one IN-PACKAGE in a source file, ick
-(in-package "SB-C")
-
-(defknown sb-pcl::pcl-instance-p (t) boolean
- (movable foldable flushable explicit-check))
-
-(deftransform sb-pcl::pcl-instance-p ((object))
- (let* ((otype (continuation-type object))
- (std-obj (specifier-type 'sb-pcl::std-object)))
- (cond
- ;; Flush tests whose result is known at compile time.
- ((csubtypep otype std-obj) 't)
- ((not (types-intersect otype std-obj)) 'nil)
- (t
- `(typep (sb-kernel:layout-of object) 'sb-pcl::wrapper)))))
-
-(in-package "SB-PCL")
-
-;;; FIXME: What do these do? Could we use SB-KERNEL:INSTANCE-REF instead?
-(defmacro %instance-ref (slots index)
- `(%svref ,slots ,index))
-(defmacro instance-ref (slots index)
- `(svref ,slots ,index))
-
-;;; Note on implementation under CMU CL >=17 and SBCL: STD-INSTANCE-P is
-;;; only used to discriminate between functions (including FINs) and
-;;; normal instances, so we can return true on structures also. A few
-;;; uses of (or std-instance-p fsc-instance-p) are changed to
-;;; pcl-instance-p.
+(declaim (ftype (function (simple-vector index) t) clos-slots-ref))
+(defun clos-slots-ref (slots index)
+ (svref slots index))
+(declaim (ftype (function (t simple-vector index) t) (setf clos-slots-ref)))
+(defun (setf clos-slots-ref) (new-value slots index)
+ (setf (svref slots index) new-value))
+
+;;; Note on implementation under CMU CL >=17 and SBCL: STD-INSTANCE-P
+;;; is only used to discriminate between functions (including FINs)
+;;; and normal instances, so we can return true on structures also. A
+;;; few uses of (OR STD-INSTANCE-P FSC-INSTANCE-P) are changed to
+;;; PCL-INSTANCE-P.