Changeset 13696
- Timestamp:
- May 13, 2010, 3:06:28 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/source/lib/defstruct-lds.lisp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/lib/defstruct-lds.lisp
r13067 r13696 286 286 (intern (%str-cat (string name1) (string name2)))) 287 287 288 (defun wrap-with-type- check(value slot &aux (slot-type (ssd-type slot)))288 (defun wrap-with-type-declaration (value slot &aux (slot-type (ssd-type slot))) 289 289 (if (eq t slot-type) 290 290 value 291 `( require-type ,value ',slot-type)))291 `(the ,slot-type ,value))) 292 292 293 293 (defun make-class-cells-list (class-names) … … 316 316 (if (eql 0 name) 317 317 (push (make-class-cells-list (ssd-initform slot)) values) 318 (push (wrap-with-type- check(ssd-initform slot) slot) values))318 (push (wrap-with-type-declaration (ssd-initform slot) slot) values)) 319 319 (let* ((temp (make-symbol (symbol-name name)))) 320 320 (push (list (list (make-keyword name) temp) (ssd-initform slot)) args) 321 (push (wrap-with-type- checktemp slot) values)))321 (push (wrap-with-type-declaration temp slot) values))) 322 322 (setq offset (%i+ offset 1))) 323 323 (setq values (nreverse values)) … … 375 375 values) 376 376 (setq offset (%i+ offset 1))) 377 (setq values (mapcar #'wrap-with-type- check(nreverse values) (sd-slots sd)))377 (setq values (mapcar #'wrap-with-type-declaration (nreverse values) (sd-slots sd))) 378 378 `(defun ,(car boa) ,(nreverse args) 379 379 ,(case (setq slot (defstruct-reftype (sd-type sd)))
Note:
See TracChangeset
for help on using the changeset viewer.
