     (. gen endMethod)))
 
 (defn emit-array
-  [gen asm-type contents]
+  [^GeneratorAdapter gen asm-type contents]
   (AsmUtil/pushInt gen (count contents))
   (. gen newArray asm-type)
   (dotimes [n (count contents)]

  (. gen invokeVirtual (asmtype java.io.PrintWriter) (Method/getMethod "void println(String)")))

(defn emit-var
  [gen sym]
  (. gen push (namespace sym))
  (. gen push (name sym))
  (. gen invokeStatic (asmtype RT) (Method/getMethod "clojure.lang.Var var(String,String)")))

(declare emit-jvm)
(defmethod emit-seq :jvm
  [env context gen [_ & insns]]
  (doseq [i insns]
    (emit-jvm env context gen i)))

(defmethod emit-seq -invoke-
  [env context gen [fun & args :as call]]
  (when (nil? fun)
    (throw (IllegalArgumentException. "Can't invoke nil")))
  (debug "emitting invoke:" call)

            (MethodType/methodType CallSite (into-array Class [MethodHandles$Lookup String MethodType String])))))

(defn emit-global
  [^GeneratorAdapter gen sym]
  (. gen invokeDynamic "getGlobal"
     (.toMethodDescriptorString (MethodType/methodType Object (make-array Class 0)))
     global-bootstrap
