I think self-hosted cljs is not intended to work with advanced optimiatztions. 
Advanced optimizations renames everything including all core functions from 
cljs.core. One the other hand, when using self-hosted cljs, compiler relies on 
a fact that core functions unrenamed. For example to process macros, compiler 
has to compile and evaluate them. For example you have following macro:

(defmacro triple [x] (str 3 x))

When compiling cljs code that uses that macro, compiler first compiles macro to 

my.math$macros.triple = function(_AMPERSAND_form,_AMPERSAND_env,x){
  return [cljs.core.str((3)),cljs.core.str(x)].join('');
};

You can see that that macro uses cljc.core.str. With advanced optimizations 
this function is renamed to something like "gy" and compiler has no idea about 
it. So to make it work you have to keep all mappings between original and 
renamed functions. And this mapping defeats all benefits from using advanced 
optimizations. 

I think there are other things that are not possible with advanced 
optimizations, e.g. goog.require/goog.provide ns management doesn't exist in 
advanced, but self-hosted cljs relies on it to be present.

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.

Reply via email to