 
      (def ^:dynamic *trace-capture* nil)
 
-     (defn apply-js-mixin [the-type mixin]
-       (let [ptype (.-prototype the-type)]
-         (goog.object/forEach
-          mixin
-          (fn [val key obj]
-            (aset ptype key val)))))
-
-     (def fwatch-mixin
-       #js {:addFWatch
-            (fn addFWatch [key f]
-              (this-as this
-                       (when-not (aget (.-fwatches this) key)
-                         (set! (.-watchers this) (inc (.-watchers this)))
-                         (aset (.-fwatches this) key f))))
-            :removeFWatch
-            (fn removeFWatch [key]
-              (this-as this
-                       (when (aget (.-fwatches this) key)
-                         (set! (.-watchers this) (dec (.-watchers this)))
-                         (js-delete (.-fwatches this) key))))
-            :notifyFWatches
-            (fn notifyFWatches [oldVal newVal]
-              (this-as this
-                       (goog.object/forEach
-                        (.-fwatches this)
-                        (fn [f key _]
-                          (f key this oldVal newVal)))
-                       (doseq [[key f] (.-watches this)]
-                         (f key this oldVal newVal))))})
-
      (defn- make-register-dep [rx]
        (fn do-register-dep [dep id binding-info]
          (when *trace-capture* (*trace-capture* dep))


       IHash
       (-hash [this] (goog/getUid this)))

     (apply-js-mixin ReactiveExpression fwatch-mixin)
     (apply-js-mixin ReactiveExpression invalidates-mixin)
     (apply-js-mixin ReactiveExpression rx-mixin)

     (defn rx*
       ([f] (rx* f true))

            (js-delete (.-deps rx) id)
            (.invalidate rx)))))

     (def invalidates-binding-info
       (BindingInfo.
        #(.rawDeref %)
        #(.addInvalidationWatch % %2 %3)
        #(.removeInvalidationWatch % %2)
        #(.clean %)))
     
     (deftype ReactiveExpression [id ^:mutable state ^:mutable dirty f deps meta watches fwatches watchers
                                  invalidation-watches iwatchers
                                  register-dep-fn lazy trace-captures]
