Changeset 7810 for branches/working-0711/ccl/level-1/l1-clos.lisp
- Timestamp:
- Dec 3, 2007, 9:53:40 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/working-0711/ccl/level-1/l1-clos.lisp
r7789 r7810 1878 1878 (and (null (cdr (compute-applicable-methods #'initialize-instance (list proto)))) 1879 1879 (null (cdr (compute-applicable-methods #'shared-initialize (list proto t))))))) 1880 (let* ((slotds (sort (copy-list (class-slots class)) #' <:key #'slot-definition-location))1880 (let* ((slotds (sort (copy-list (class-slots class)) #'(lambda (x y) (if (consp x) x (if (consp y) y (< x y)))) :key #'slot-definition-location)) 1881 1881 (default-initargs (class-default-initargs class))) 1882 1882 ;; Punt if any slot has multiple initargs … … 1886 1886 (collect ((keys) 1887 1887 (binds) 1888 (class-slot-inits) 1888 1889 (forms)) 1889 1890 (dolist (slot slotds) … … 1891 1892 (initfunction (slot-definition-initfunction slot)) 1892 1893 (initform (slot-definition-initform slot)) 1894 (location (slot-definition-location slot)) 1893 1895 (name (slot-definition-name slot)) 1894 1896 (initial-value-form (if initfunction … … 1910 1912 `(funcall ,function))) 1911 1913 initial-value-form)))) 1912 (if ( eq type t)1913 ( forms name)1914 (if (consp location) 1915 (class-slot-inits `(when (eq (%slot-unbound-marker) (cdr ',location))(setf (cdr ',location) (require-type ,name ',type)))) 1914 1916 (forms `(require-type ,name ',type)))) 1915 (if (eq type t) 1916 (forms initial-value-form) 1917 (if (consp location) 1918 (class-slot-inits `(when (eq (%slot-unbound-marker) (cdr ',location))(setf (cdr ',location) (require-type ,initial-value-form ',type)))) 1919 1917 1920 (forms `(require-type ,initial-value-form ',type)))))) 1918 1921 (let* ((cell (make-symbol "CLASS-CELL")) … … 1922 1925 (binds `(,instance (gvector :instance 0 (class-cell-extra ,cell) ,slots))) 1923 1926 `(lambda (,cell &key ,@(keys)) 1927 ,@(class-slot-inits) 1924 1928 (let* (,@(binds)) 1925 1929 (setf (instance.hash ,instance) (strip-tag-to-fixnum ,instance)
Note: See TracChangeset
for help on using the changeset viewer.