anchor.diff:      ;; that we must respect fill pointers.
       (vector
        (macrolet ((frob ()
  -                  '(let ((result 572539))
  +                  '(let ((result 572539)
  +                         (defined-length (defined-length key)))
                        (declare (type fixnum result))
  -                     (mixf result (length key))
  +                     (mixf result defined-length)
                       (when (plusp depthoid)
                         (decf depthoid)
  -                      (dotimes (i (length key))
  +                      (dotimes (i defined-length)
                          (declare (type fixnum i))
                          (mixf result
                                (swxhash (aref key i) depthoid))))
  
positive.code: ;; to avoid having CMUCL treat it as a constant, in which case
  ;; code under the false branch would be optimized away!
  (defvar SpecCalc::specwareWizard? nil) ; see Specware4/Languages/SpecCalculus/Semantics/Monad.sw
  
  (defparameter quotient-tag
    (list :|Quotient|))
  
negative.code: 
  (defun Specware::swxhash (key) (swxhash key))
  
  ;;; defined-length is the length of the vector if you discard the trailing undefined values.
  (defun defined-length (vec) 
    (do ((i (- (length vec) 1) (- i 1)))
        ((eql i -1) 0)
      (declare (fixnum i))
      (unless (undefined? (svref vec i))
        (return (+ i 1)))))
  
  (defun array-swxhash (key depthoid)
    #+sbcl(declare (optimize speed))
    (declare (type array key))
  