Changeset 7956 for branches/working-0711/ccl/lib/macros.lisp
- Timestamp:
- Dec 26, 2007, 8:04:40 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/working-0711/ccl/lib/macros.lisp
r7854 r7956 2629 2629 (let* ((hash (gensym)) 2630 2630 (keys (gensym)) 2631 (values (gensym)) 2632 (count (gensym)) 2631 2633 (state (gensym))) 2632 2634 `(let* ((,hash ,hash-table) 2633 (,keys (make-array (the fixnum (hash-table-count ,hash)))) 2634 (,state (vector ,hash 0 ,keys (enumerate-hash-keys ,hash ,keys)))) 2635 (declare (dynamic-extent ,keys ,state)) 2636 (macrolet ((,mname () `(next-hash-table-iteration ,',state))) 2635 (,count (hash-table-count ,hash)) 2636 (,keys (make-array ,count)) 2637 (,values (make-array ,count)) 2638 (,state (vector ,hash 0 ,keys ,values (enumerate-hash-keys-and-values ,hash ,keys ,values)))) 2639 (declare (dynamic-extent ,keys ,state) 2640 (fixnum ,count)) 2641 (macrolet ((,mname () `(next-hash-table-iteration-1 ,',state))) 2637 2642 ,@body)))) 2638 2643 … … 2987 2992 2988 2993 (defmacro with-process-whostate ((whostate) &body body) 2989 (let* ((p (gensym)) 2990 (old-whostate (gensym))) 2991 `(let* ((,p *current-process*) 2992 (,old-whostate (process-whostate ,p))) 2993 (unwind-protect 2994 (progn 2995 (setf (%process-whostate ,p) ,whostate) 2996 ,@body) 2997 (setf (%process-whostate ,p) ,old-whostate))))) 2994 `(let* ((*whostate* ,whostate)) 2995 ,@body)) 2998 2996 2999 2997
Note: See TracChangeset
for help on using the changeset viewer.