 (defmethod emit* :meta
   [{:keys [expr meta env]}]
   (emit-wrap env
-    (emits "with_meta(" expr "," meta ")")))
+    (emits "With_meta(" expr "," meta ")")))
+
+(def ^:private array-map-threshold 8)
+(def ^:private obj-map-threshold 8)
+
+(defn distinct-keys? [keys]
+  (and (every? #(= (:op %) :constant) keys)
+       (= (count (into #{} keys)) (count keys))))
 
 (defmethod emit* :map
   [{:keys [env keys vals]}]

      (io/file (to-path (cons target parents)))
      (str (last relative-path) ".go"))))


;; TODO: needs fixing, table will include other things than keywords - David


  (if (= :expr (:context env))
    (emits "func() interface{} {panic(" throw ")}()")
    (emitln "panic(" throw ")")))

(defn emit-comment
  "Emit a nicely formatted comment string."
  [doc jsdoc]
  (let [docs (when doc [doc])
        docs (if jsdoc (concat docs jsdoc) docs)
        docs (remove nil? docs)]
    (letfn [(print-comment-lines [e] (doseq [next-line (string/split-lines e)]
                                       (emitln "* " (string/trim next-line))))]
      (when (seq docs)
        (emitln "/**")
        (doseq [e docs]
          (when e
            (print-comment-lines e)))
        (emitln "*/")))))

(defmethod emit* :def
  [{:keys [name var init env doc export]}]
