<div dir="ltr">Sonny,<div><br></div><div>Gambit has its own register of global variables, which it keeps in some JS object. An external JS code tree shaker would not be able to distinguish what can be removed and what cannot as they - as far as I am aware - not introspect JS structures, but instead just look for unused identifiers/functions and remove those. And also it would not be able to remove what's not used.</div><div><br></div><div>So the whole way input code maps to JS code is beyond what JS code shaker's abilities.</div><div><br></div><div>However maybe my understanding of your JS tree shaker is not correct and it's so incredibly smart that it can cut through also such intricate code.</div><div><br></div><div>What about you give it a try and let us know here?</div><div><br></div><div>Adam</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-09-18 0:36 GMT+08:00 Sonny To <span dir="ltr"><<a href="mailto:son.c.to@gmail.com" target="_blank">son.c.to@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Have you considered running the output through google closure compiler for the tree shaking? thats what clojurescript does</div><br><div class="gmail_quote"><div><div class="h5"><div dir="ltr">On Sun, Sep 17, 2017 at 6:21 AM Adam <<a href="mailto:adam.mlmb@gmail.com" target="_blank">adam.mlmb@gmail.com</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2017-08-17 10:13 GMT+08:00 mikel evins <span dir="ltr"><<a href="mailto:mevins@me.com" target="_blank">mevins@me.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
> On Aug 16, 2017, at 9:11 PM, Marc Feeley <<a href="mailto:feeley@iro.umontreal.ca" target="_blank">feeley@iro.umontreal.ca</a>> wrote:<br>
><br>
> The JavaScript backend is being worked on actively this summer.  It is in much better shape than 6 months ago.  Currently we are working on implementing a tree shaker to reduce the size of generated code.<br>
<br>
</span>Nice!<br>
<br>
Thanks,<br>
<div class="m_-6786368402808614859m_3900780644561945086HOEnZb"><div class="m_-6786368402808614859m_3900780644561945086h5"><br>
--me<br></div></div></blockquote><div><br></div><div>What's new with respect to the Javascript output now?</div></div></div></div></div></div><span class="">
______________________________<wbr>_________________<br>
Gambit-list mailing list<br>
<a href="mailto:Gambit-list@iro.umontreal.ca" target="_blank">Gambit-list@iro.umontreal.ca</a><br>
<a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" rel="noreferrer" target="_blank">https://webmail.iro.umontreal.<wbr>ca/mailman/listinfo/gambit-<wbr>list</a><br>
</span></blockquote></div>
</blockquote></div><br></div>