Changeset 11365
- Timestamp:
- Nov 15, 2008, 2:28:24 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/working-0711/ccl/level-1/l1-clos.lisp
r11101 r11365 302 302 (defvar *update-slots-preserve-existing-wrapper* nil) 303 303 304 (defvar *optimized-dependents* (make-hash-table :test 'eq :weak :key) 305 "Hash table mapping a class to a list of all objects that have been optimized to 306 depend in some way on the layout of the class") 307 308 (defun note-class-dependent (class gf) 309 (pushnew gf (gethash class *optimized-dependents*))) 310 311 ;; Yeah, yeah, when/if this gets more general can use generic functions. 312 (defun unoptimize-dependents (class) 313 (loop for obj in (gethash class *optimized-dependents*) 314 do (etypecase obj 315 (standard-generic-function (compute-dcode obj))))) 316 304 317 (defun update-slots (class eslotds) 305 318 (let* ((instance-slots (extract-slotds-with-allocation :instance eslotds)) … … 321 334 (make-instances-obsolete class) 322 335 (%cons-wrapper class))))) 336 (when old-wrapper 337 (unoptimize-dependents class)) 323 338 (setf (%class-slots class) eslotds) 324 339 (setf (%wrapper-instance-slots new-wrapper) new-ordering … … 2004 2019 2005 2020 2006 2007 2021 ;;; Try to replace gf dispatch with something faster in f. 2008 (defun %snap-reader-method (f )2022 (defun %snap-reader-method (f &key (redefinable t)) 2009 2023 (when (slot-boundp f 'methods) 2010 2024 (let* ((methods (generic-function-methods f))) … … 2032 2046 ;; of the alist pairs - are small, positive fixnums. 2033 2047 (when (every (lambda (pair) (typep (cdr pair) 'fixnum)) alist) 2048 (when redefinable 2049 (loop for (c . nil) in alist 2050 do (note-class-dependent c f))) 2034 2051 (clear-gf-dispatch-table dt) 2035 2052 (setf (%gf-dispatch-table-argnum dt) -1) ;mark as non-standard
Note: See TracChangeset
for help on using the changeset viewer.