Remove old interop code

This commit is contained in:
Dan Holmsand 2014-03-25 17:51:03 +01:00
parent 2e0e369d93
commit 9fee64b1bf
1 changed files with 0 additions and 25 deletions

View File

@ -78,28 +78,3 @@
`(and (fn? ~f)
(not (nil? (aget ~f "fvar"))))
`(fn? f)))
(defn- kwd [k]
(if (keyword? k) (name k) k))
(defmacro oget
([o k]
`(aget ~o ~(kwd k)))
([o k & ks]
`(aget ~o ~@(map kwd (list* k ks)))))
(defmacro oset
([o k v]
`(aset ~o ~(kwd k) ~v))
([o k1 k2 & ksv]
`(aset ~o
~@(map kwd (list* k1 k2 (butlast ksv)))
~(last ksv))))
(defmacro odo
[o k & args]
(let [f (cond (not (vector? k)) (list 'aget o (kwd k))
(empty? k) o
:else (list* 'aget o (map kwd k)))]
(js-call f args)))