Changeset 14860
- Timestamp:
- Jul 2, 2011, 3:37:33 AM (13 years ago)
- Location:
- trunk/source/level-1
- Files:
-
- 2 edited
-
l1-clos.lisp (modified) (2 diffs)
-
l1-dcode.lisp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/level-1/l1-clos.lisp
r14558 r14860 2137 2137 do (note-class-dependent c f))) 2138 2138 (clear-gf-dispatch-table dt) 2139 (setf (%gf-dispatch-table-argnum dt) -1) ;mark as non-standard 2139 (let* ((argnum (%gf-dispatch-table-argnum dt))) 2140 (unless (< argnum 0) 2141 (setf (%gf-dispatch-table-argnum dt) (lognot argnum) 2142 (%gf-dispatch-table-gf dt) (%gf-dcode f)))) 2143 2140 2144 (cond ((null (cdr alist)) 2141 2145 ;; Method is only applicable to a single class. … … 2531 2535 ;; Un-snap reader methods, undo other GF optimizations. 2532 2536 (dolist (f (population-data %all-gfs%)) 2533 (let* ((dt (%gf-dispatch-table f))) 2534 (clear-gf-dispatch-table dt) 2535 (compute-dcode f)))) 2537 (let* ((dt (%gf-dispatch-table f)) 2538 (argnum (%gf-dispatch-table-argnum dt))) 2539 (when (< argnum 0) 2540 (let* ((dcode (%gf-dispatch-table-gf dt))) 2541 (setf (%gf-dispatch-table-argnum dt) (lognot argnum) 2542 (%gf-dispatch-table-gf dt) f 2543 (%gf-dcode f) dcode) 2544 (clear-gf-dispatch-table dt)))))) 2536 2545 2537 2546 ;;; If there's a single method (with standard method combination) on -
trunk/source/level-1/l1-dcode.lisp
r14558 r14860 182 182 (defun clear-gf-cache (gf) 183 183 #-bccl (unless t (typep gf 'standard-generic-function) 184 (report-bad-arg gf 'standard-generic-function))184 (report-bad-arg gf 'standard-generic-function)) 185 185 (let ((dt (%gf-dispatch-table gf))) 186 (if (eq (%gf-dispatch-table-size dt) *min-gf-dispatch-table-size*) 187 (clear-gf-dispatch-table dt) 188 (let ((new (make-gf-dispatch-table))) 189 (setf (%gf-dispatch-table-methods new) (%gf-dispatch-table-methods dt)) 190 (setf (%gf-dispatch-table-precedence-list new) 191 (%gf-dispatch-table-precedence-list dt)) 192 (setf (%gf-dispatch-table-gf new) gf) 193 (setf (%gf-dispatch-table-keyvect new) 194 (%gf-dispatch-table-keyvect dt)) 195 (setf (%gf-dispatch-table-argnum new) (%gf-dispatch-table-argnum dt)) 196 (setf (%gf-dispatch-table gf) new))))) 186 (unless (< (%gf-dispatch-table-argnum dt) 0) ;reader-method optimization 187 (if (eq (%gf-dispatch-table-size dt) *min-gf-dispatch-table-size*) 188 (clear-gf-dispatch-table dt) 189 (let ((new (make-gf-dispatch-table))) 190 (setf (%gf-dispatch-table-methods new) (%gf-dispatch-table-methods dt)) 191 (setf (%gf-dispatch-table-precedence-list new) 192 (%gf-dispatch-table-precedence-list dt)) 193 (setf (%gf-dispatch-table-gf new) gf) 194 (setf (%gf-dispatch-table-keyvect new) 195 (%gf-dispatch-table-keyvect dt)) 196 (setf (%gf-dispatch-table-argnum new) (%gf-dispatch-table-argnum dt)) 197 (setf (%gf-dispatch-table gf) new)))))) 197 198 198 199 (defun %gf-dispatch-table-store-conditional (dt index new)
Note:
See TracChangeset
for help on using the changeset viewer.
