Scheme2Js 20060718 reviewDownload
Scheme2Js provides several flags, that allow to modify the result:
--optimize-while: with this flag Scheme2Js optimizes common while loops. The unoptimized while loops are often of the form:
resVar = res;
This optimization looks for these patterns and moves the test into the while loop:
resVar = res;
This optimization has been implemented only recently and is therefore not yet activated by default.
--verbose prints some information.
--no-inlining disables all function inlining (constants might still be inlined).
--inline-globals lets Scheme2Js inline global functions and constants. This might have two unwanted side-effects: for one, global variables are often used to transfer data between different modules. Some inlined functions are lost if there is no reference to them anymore. If global functions are to be used outside a module, one should not use this flag. (This behavior is likely to change in future versions of Scheme2Js.)
--no-tailrec disables the tailrec to while-loop optimization. If you suspect a bug in the compiler's way of translating tail-recs, you could try this flag.
--no-optimize-calls disables Scheme2Js inlining of binary or unary operations. For instance sci_plus(3, 5) is optimized to (3+5). This optimization is quite important, and there's usually no reason to disable it.
--no-optimize-consts disables the pre-constant calculation. Unless disabled (with this flag), compound constants are precalculated and their occurrences replaced by a reference to a variable holding the constant. This makes repeated accesses to these constants faster, but introduces new variables.
--d STAGE prints a dot-file (see graphviz) of the AST after stage STAGE. Possible stages are: expand, tree, symbol, node-elim1, tail, inline, constant-propagation, rm-unused-vars, capture, node-elim2, while, (tt "statements"), node-elim3. Usually one doesn't need this flag, unless for debugging purposes.
What's New in This Release:
This release adds trampolines.
Scheme2Js 20060718 search tags