Skip to content

Commit 08aa70f

Browse files
committed
Linear code emitter.
The emitter we inherited from ClojureScript emitted Clojure expressions as JavaScript expressions. C expressions do not support loops, however, so we had to transform loop subexpressions into separate functions which we could call from within the larger expression. This created a problem: On invocations, we now inherited the C compiler's argument evaluation order, which is not specified in the C standard, i.e., we got whatever the C compiler decided would be best. The new emitter emits an assignment to a new variable for each subexpression, which nicely solves the problem, doesn't require extra functions (except for try, but it should also be possible to handle this without an extra function), and is simpler.
1 parent 7d1a17f commit 08aa70f

File tree

1 file changed

+292
-461
lines changed

1 file changed

+292
-461
lines changed

0 commit comments

Comments
 (0)