Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

* src/clj/cljs/compiler.clj: prep for passing along direct variadic info

  • Loading branch information...
commit 56edba3119b07feefcd0b76351119cd58453e367 1 parent fdff1b1
David Nolen authored

Showing 1 changed file with 14 additions and 13 deletions. Show diff stats Hide diff stats

  1. +14 13 src/clj/cljs/compiler.clj
27 src/clj/cljs/compiler.clj
@@ -682,19 +682,20 @@
682 682 (not (-> f :info :dynamic))
683 683 (-> f :info :fn-var))
684 684 js? (= (-> f :info :ns) 'js)
685   - f (if fn?
686   - (let [info (-> f :info)
687   - arity (count args)
688   - mps (:method-params info)]
689   - (if (or (> arity (:max-fixed-arity info))
690   - (= (count mps) 1))
691   - f
692   - (let [arities (map count mps)]
693   - (if (some #{arity} arities)
694   - (update-in f [:info :name]
695   - (fn [name] (symbol (str name ".cljs$lang$arity$" arity))))
696   - f))))
697   - f)]
  685 + [f direct-variadic?]
  686 + (if fn?
  687 + (let [info (-> f :info)
  688 + arity (count args)
  689 + mps (:method-params info)]
  690 + (if (or (> arity (:max-fixed-arity info))
  691 + (= (count mps) 1))
  692 + [f false]
  693 + (let [arities (map count mps)]
  694 + (if (some #{arity} arities)
  695 + [(update-in f [:info :name]
  696 + (fn [name] (symbol (str name ".cljs$lang$arity$" arity)))) false]
  697 + [f false]))))
  698 + [f false])]
698 699 (emit-wrap env
699 700 (emits f (when-not (or fn? js?) ".call") "("
700 701 (let [args (if (or fn? js?) args (cons "null" args))]

0 comments on commit 56edba3

Please sign in to comment.
Something went wrong with that request. Please try again.