(defn fn-name-var [env locals name]
(when (some? name)
(let [ns (-> env :ns :name)
shadow (get locals name)
shadow (when (nil? shadow)
(get-in env [:js-globals name]))
fn-scope (:fn-scope env)
name-var {:name name
:info {:fn-self-name true
:fn-scope fn-scope
:ns ns
:shadow shadow}}
tag (-> name meta :tag)
ret-tag (when (some? tag)
{:ret-tag tag})]
(merge name-var ret-tag))))