javascript: add naive optimizer
javascript: refactored tailcalls
javascript: use optimizer for tailcalls
Merge pull request #514 from raichoo/javascript

Javascript