             (MethodType/methodType CallSite (into-array Class [MethodHandles$Lookup String MethodType String])))))
 
 (defn emit-global
-  [gen sym]
+  [^GeneratorAdapter gen sym]
   (. gen invokeDynamic "getGlobal"
      (.toMethodDescriptorString (MethodType/methodType Object (make-array Class 0)))
      global-bootstrap

;;   [env context gen [_ fields :as defcls]])

(defmethod emit-seq 'let
  [env context gen [_ bindings & body :as the-let]]
  (let [start-label (. gen newLabel)
        end-label (. gen newLabel)
        names (mapv #(vector (first %) (. gen newLocal object-type)) bindings)

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

(defn emit-var
  [^GeneratorAdapter 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 ^GeneratorAdapter gen [_ & insns]]
  (doseq [i insns]
    (emit-jvm env context gen i)))

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