1 (the fixnum (1+ old-count))))))))
(deftype field-type ()
- '(mod #.sb-kernel:layout-clos-hash-length))
+ '(mod #.layout-clos-hash-length))
(eval-when (:compile-toplevel :load-toplevel :execute)
(defun power-of-two-ceiling (x)
;;; are the forms of this constant which it is more convenient for the
;;; runtime code to use.
(defconstant wrapper-cache-number-length
- (integer-length sb-kernel:layout-clos-hash-max))
-(defconstant wrapper-cache-number-mask sb-kernel:layout-clos-hash-max)
+ (integer-length layout-clos-hash-max))
+(defconstant wrapper-cache-number-mask layout-clos-hash-max)
(defconstant wrapper-cache-number-adds-ok
- (truncate most-positive-fixnum sb-kernel:layout-clos-hash-max))
+ (truncate most-positive-fixnum layout-clos-hash-max))
\f
;;;; wrappers themselves
;;; have a fixed number of cache hash values, and that number must
;;; correspond to the number of cache lines we use.
(defconstant wrapper-cache-number-vector-length
- sb-kernel:layout-clos-hash-length)
+ layout-clos-hash-length)
(unless (boundp '*the-class-t*)
(setq *the-class-t* nil))
(defmacro wrapper-class (wrapper)
- `(sb-kernel:classoid-pcl-class (sb-kernel:layout-classoid ,wrapper)))
+ `(classoid-pcl-class (layout-classoid ,wrapper)))
(defmacro wrapper-no-of-instance-slots (wrapper)
- `(sb-kernel:layout-length ,wrapper))
+ `(layout-length ,wrapper))
(defmacro wrapper-instance-slots-layout (wrapper)
`(%wrapper-instance-slots-layout ,wrapper))
;;; whose slots are not initialized yet, and which may be built-in
;;; classes. We pass in the class name in addition to the class.
(defun boot-make-wrapper (length name &optional class)
- (let ((found (sb-kernel:find-classoid name nil)))
+ (let ((found (find-classoid name nil)))
(cond
(found
- (unless (sb-kernel:classoid-pcl-class found)
- (setf (sb-kernel:classoid-pcl-class found) class))
- (aver (eq (sb-kernel:classoid-pcl-class found) class))
- (let ((layout (sb-kernel:classoid-layout found)))
+ (unless (classoid-pcl-class found)
+ (setf (classoid-pcl-class found) class))
+ (aver (eq (classoid-pcl-class found) class))
+ (let ((layout (classoid-layout found)))
(aver layout)
layout))
(t
(make-wrapper-internal
:length length
- :classoid (sb-kernel:make-standard-classoid
+ :classoid (make-standard-classoid
:name name :pcl-class class))))))
;;; The following variable may be set to a STANDARD-CLASS that has
:classoid
(let ((owrap (class-wrapper class)))
(cond (owrap
- (sb-kernel:layout-classoid owrap))
+ (layout-classoid owrap))
((*subtypep (class-of class)
*the-class-standard-class*)
(cond ((and *pcl-class-boot*
(eq (slot-value class 'name) *pcl-class-boot*))
- (let ((found (sb-kernel:find-classoid
+ (let ((found (find-classoid
(slot-value class 'name))))
- (unless (sb-kernel:classoid-pcl-class found)
- (setf (sb-kernel:classoid-pcl-class found) class))
- (aver (eq (sb-kernel:classoid-pcl-class found) class))
+ (unless (classoid-pcl-class found)
+ (setf (classoid-pcl-class found) class))
+ (aver (eq (classoid-pcl-class found) class))
found))
(t
- (sb-kernel:make-standard-classoid :pcl-class class))))
+ (make-standard-classoid :pcl-class class))))
(t
- (sb-kernel:make-random-pcl-classoid :pcl-class class))))))
+ (make-random-pcl-classoid :pcl-class class))))))
(t
- (let* ((found (sb-kernel:find-classoid (slot-value class 'name)))
- (layout (sb-kernel:classoid-layout found)))
- (unless (sb-kernel:classoid-pcl-class found)
- (setf (sb-kernel:classoid-pcl-class found) class))
- (aver (eq (sb-kernel:classoid-pcl-class found) class))
+ (let* ((found (find-classoid (slot-value class 'name)))
+ (layout (classoid-layout found)))
+ (unless (classoid-pcl-class found)
+ (setf (classoid-pcl-class found) class))
+ (aver (eq (classoid-pcl-class found) class))
(aver layout)
layout))))
(defmacro cache-number-vector-ref (cnv n)
`(wrapper-cache-number-vector-ref ,cnv ,n))
(defmacro wrapper-cache-number-vector-ref (wrapper n)
- `(sb-kernel:layout-clos-hash ,wrapper ,n))
+ `(layout-clos-hash ,wrapper ,n))
(declaim (inline wrapper-class*))
(defun wrapper-class* (wrapper)
(or (wrapper-class wrapper)
(find-structure-class
- (sb-kernel:classoid-name (sb-kernel:layout-classoid wrapper)))))
+ (classoid-name (layout-classoid wrapper)))))
;;; The wrapper cache machinery provides general mechanism for
;;; trapping on the next access to any instance of a given class. This
(declaim (inline invalid-wrapper-p))
(defun invalid-wrapper-p (wrapper)
- (not (null (sb-kernel:layout-invalid wrapper))))
+ (not (null (layout-invalid wrapper))))
(defvar *previous-nwrappers* (make-hash-table))
(push previous new-previous))
(let ((ocnv (wrapper-cache-number-vector owrapper)))
- (dotimes (i sb-kernel:layout-clos-hash-length)
+ (dotimes (i layout-clos-hash-length)
(setf (cache-number-vector-ref ocnv i) 0)))
- (push (setf (sb-kernel:layout-invalid owrapper) (list state nwrapper))
+ (push (setf (layout-invalid owrapper) (list state nwrapper))
new-previous)
(setf (gethash owrapper *previous-nwrappers*) ()
(defun check-wrapper-validity (instance)
(let* ((owrapper (wrapper-of instance))
- (state (sb-kernel:layout-invalid owrapper)))
+ (state (layout-invalid owrapper)))
(if (null state)
owrapper
(ecase (car state)
(declaim (inline check-obsolete-instance))
(defun check-obsolete-instance (instance)
- (when (invalid-wrapper-p (sb-kernel:layout-of instance))
+ (when (invalid-wrapper-p (layout-of instance))
(check-wrapper-validity instance)))
\f
(defvar *free-caches* nil)