     (emitln "* @param {*=} __meta ")
     (emitln "* @param {*=} __extmap")
     (emitln "*/")
-    (emitln (munge t) " = (function (" (comma-sep fields) "){")
+    (emitln (munge t) " = (func (" (comma-sep fields) "){")
+    (emitln "var this = new(" t ")")
     (doseq [fld fields]
       (emitln "this." fld " = " fld ";"))
     (doseq [[pno pmask] pmasks]
-      (emitln "this.cljs$lang$protocol_mask$partition" pno "$ = " pmask ";"))
-    (emitln "if(arguments.length>" (- (count fields) 2) "){")
-    (emitln "this.__meta = __meta;")
-    (emitln "this.__extmap = __extmap;")
+      (emitln "this.cljs$lang$protocol_mask$partition" pno "$ = " pmask))
+    (emitln "if(len(arguments)>" (- (count fields) 2) "){")
+    (emitln "this.__meta = __meta")
+    (emitln "this.__extmap = __extmap")
     (emitln "} else {")
     (emits "this.__meta=")
     (emit-constant nil)
-    (emitln ";")
+    (emitln)
     (emits "this.__extmap=")
     (emit-constant nil)
-    (emitln ";")
+    (emitln)
     (emitln "}")
     (emitln "})")))
 

       :else
       (if (and ana/*cljs-static-fns* (= (:op f) :var))
         (let [fprop (str ".cljs$core$IFn$_invoke$arity$" (count args))]
           (emits "(" f fprop " ? " f fprop "(" (comma-sep args) ") : " f ".call(" (comma-sep (cons "null" args)) "))"))
         (emits f ".call(" (comma-sep (cons "null" args)) ")"))))))

(defmethod emit* :new
  [{:keys [ctor args env]}]

        (emitln default)))
    (emitln "}")
    (when (= :expr (:context env))
      (emitln "return " gs "})()"))))

(defmethod emit* :throw
  [{:keys [throw env]}]
