Welcome! Please see the About page for a little more info on how this works.

0 votes
in ClojureScript by
{{TransientArrayMap}} has checked ifs in it surrounding its {{editable?}} field that can be eliminated if hinted:


cljs.user=> (set! *print-fn-bodies* true)
true
cljs.user=> (.. TransientArrayMap -prototype -cljs$core$ICounted$_count$arity$1)
#object[Function "function (a){if(cljs.core.truth_(this.editable_QMARK_))return cljs.core.quot(this.len,2);throw Error("count after persistent!");}"]


Note that {{TransientHashMap}} already has such a hint.

4 Answers

0 votes
by

Comment made by: mfikes

CLJS-3107.patch passes CI (/)

0 votes
by

Comment made by: mfikes

CLJS-3107.patch added to Patch Tender (i)

0 votes
by

Comment made by: mfikes

CLJS-3107.patch passes Canary (/)

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-3107 (reported by mfikes)
Welcome to Clojure Q&A, where you can ask questions and receive answers from members of the Clojure community.
...