On Wed, Apr 25, 2012 at 2:53 PM, Brandon Bloom <snprbo...@gmail.com> wrote:
> The current optimizations are really only guaranteed to work on core.cljs. >> I encountered the dependency problem while working on the optimizations. >> > > It occurs to me that these sorts of optimizations would need to tunable. > Direct arity dispatch, for example, eliminates an indirection which allows > client code to automatically point to the latest version of a function > (consider replacing a fixed arity overload with a variable arity one). > It's already tunable. Direct dispatch now only occurs under advanced compilation. You can enable it manually by passing a :static-fns flag to cljs.closure/build. > 1) Namespaces need to be mapped to ClojureScript files. This would require >>> a io/resource to discover them, which I guess involves setting CLASS_PATH? >>> >> >> I'm not sure why we need this - the user sets the src path. We can use >> this to resolve files. >> > > I'm looking at the compile-root function. It calls compile-file on each > file, but doesn't pass through any of the needed information to find other > files or see which other files have been compiled. The > cljs.compiler/namespaces atom is insufficient because of interactive > evaluation. Which "src path" are you referring to? > cljs.closure/build takes a source path parameter where it recursively looks for cljs files. We could use this path for resolution. > Not really :) Currently dependency ordering happens *after* compilation >> which is unfortunate. It would be preferable to do dependency ordering >> *before* analysis. >> > > Before? Or during, recursively? ie. should analysis of require forms > trigger resolution and analysis. My intuition says it should. > Sure. David -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en