             `(~@insts
               ~end-label))
           ;;
-	  ('while pred & body)	(let [retry-label (gensym),
-				      end-label (gensym)]
-				  `((:VM_IVAL ~(make-nil))
-                                    ~retry-label
-                                    (:VM_PUSH)
-				    ~@(compile-pass1 pred)
-				    (:VM_BIFN ~end-label)
-                                    (:VM_POP)
-				    ~@(apply concat (map compile-pass1 body))
-				    (:VM_JMP ~retry-label)
-				    ~end-label
-                                    (:VM_POP)))
+	  ('while pred & body)	(compile-while pred body)
 	  ;;
 	  ('dotimes (var num) & body)
           (compile-dotimes var num body)

      ;; (:VM_VSET ~(make-sym var))
      ;; (:VM_VREF ~(make-sym var))
      (:VM_VINC ~(make-sym var))
      (:VM_PUSH)
      (:VM_IVAL ~(make-num num))
      (:VM_LE)
      (:VM_BIF ~end-label)
      (:VM_POP)
      (:VM_JMP ~retry-label)
      ~end-label
      (:VM_POP)
      (:VM_UNBIND 1))))

(defn builtin-fun-id [fname]
  (index (fn [pair] (= (first pair) fname))


(declare compile-pass1)

(defn fold-constant [exp]
  exp)

(defn constant? [exp]
  (cond
   (or (= exp 't)
       (= exp 'T))
   true
   ;;
   :else false))

(defn kondoval-nil? [exp]
  (and (constant? exp)
       (cond
        (or (= exp 'nil)
            (= exp 'NIL))
        true
        ;;
        :else	false)))

(defn kondoval-t? [exp]
  (and (constant? exp)
       (not (kondoval-nil? exp))))

(defn compile-quote [exp]
  (cond
   (or (and (coll? exp)
