nice job! I've read the code very quickly, my understand is to convert CPS to plain JS code directly, right? Do you have a plan to generate it according to asm.js spec?
On Sun, 2015-06-07 at 18:39 +0100, Ian Price wrote: > Hi, > > As some of you will know, I am implementing a guile->js backend as > part of Google Summer of Code. This is a small update so that those of > you who do hang out on the guile irc channel can see some of the > (small) progress. > > A temporary git branch is available at > https://gitlab.com/ijp/guile/commits/compile-to-js > > I'm not going to list all the reasons you shouldn't use this code yet, > suffice to say you shouldn't. It's so far before alpha it's not even > funny. > > That said, code you can compile today includes multiple values [1], > mutual recursion [2] and using call/cc to escape early from a > loop [3]. > > 1. scheme: http://shift-reset.com/pastes/merge.html > js: http://shift-reset.com/pastes/merge-js.html > > 2. scheme: http://shift-reset.com/pastes/even.html > js: http://shift-reset.com/pastes/even-js.html > > 3. scheme: http://shift-reset.com/pastes/product.html > js: http://shift-reset.com/pastes/product-js.html > > To make the examples self-contained and runnable in node.js, I > included the code from module/language/js-il/runtime.js, assigned the > result to a var and call console.log, and beautified it with uglifyjs > for good measure. The actual output of "guild compile --to=javascript > foo.scm" can be found between the comments. >