Next: compiler cogen, Previous: compiler engine, Up: compiler [Index]
This compiler pass traverses all the function bodies and: if a ?body contains code that will cause further use of the Scheme stack, it transforms it as follows:
(seq (primopcall $stack-overflow-check ()) ?body)
so that, right after entering the execution of a function, the call to
the primitive operation $stack-overflow-check
checks if the
current Scheme stack is about to be exhausted. If a ?body does
not make further use of the stack: its function execution is a “stack
tail”.
The following bindings are exported by the library (vicare
compiler)
.
Perform code transformation traversing the whole hierarchy in
input, which must be a codes
struct representing
recordised code; build and return a new codes
struct.
Insert calls to the primitive operation $stack-overflow-check
when appropriate.