Index: /branches/working-0711/ccl/lib/macros.lisp
===================================================================
--- /branches/working-0711/ccl/lib/macros.lisp	(revision 7955)
+++ /branches/working-0711/ccl/lib/macros.lisp	(revision 7956)
@@ -2629,10 +2629,15 @@
   (let* ((hash (gensym))
          (keys (gensym))
+         (values (gensym))
+         (count (gensym))
          (state (gensym)))
     `(let* ((,hash ,hash-table)
-            (,keys (make-array (the fixnum (hash-table-count ,hash))))
-            (,state (vector ,hash 0 ,keys (enumerate-hash-keys ,hash ,keys))))
-      (declare (dynamic-extent ,keys ,state))
-      (macrolet ((,mname () `(next-hash-table-iteration ,',state)))
+            (,count (hash-table-count ,hash))
+            (,keys (make-array ,count))
+            (,values (make-array ,count))
+            (,state (vector ,hash 0 ,keys ,values (enumerate-hash-keys-and-values ,hash ,keys ,values))))
+      (declare (dynamic-extent ,keys ,state)
+               (fixnum ,count))
+      (macrolet ((,mname () `(next-hash-table-iteration-1 ,',state)))
         ,@body))))
 
@@ -2987,13 +2992,6 @@
 
 (defmacro with-process-whostate ((whostate) &body body)
-  (let* ((p (gensym))
-         (old-whostate (gensym)))
-    `(let* ((,p *current-process*)
-            (,old-whostate (process-whostate ,p)))
-      (unwind-protect
-           (progn
-             (setf (%process-whostate ,p) ,whostate)
-             ,@body)
-        (setf (%process-whostate ,p) ,old-whostate)))))
+  `(let* ((*whostate* ,whostate))
+    ,@body))
 
 
