
Next: Expander
Up: Compilier
Previous: Compilier
A Scheme_Compile_Info struct includes the following fields:
- base_let_depth -- This value is set on entry and does not
need to be changed. Its value is only relevant if the syntax needs to
extand the environment with new variables, and the syntax want the
slots to be created automatically (by an enclosing lambda or
let form) if possible. A value of -1 indicates that the frame
cannot be allocated automactically; any other value indicates the
starting point for new variables in a pre-allocated frame. If the new
syntax extends the environment and compiles sub-expressions, then this
value must be set to either -1 (indicating that the new syntax does
not wish to auto-allocate slots for subexpressions when the syntax allocates a
frame) or to one past last frame slots that the new syntax will use.
- max_let_depth -- This value must be set on exit to the
maximum number of frame slots the new syntax (and its subexpressions) will need
auto-allocated. This value is only used when base_let_depth is
nto -1 on entry.
- is_proc_closure -- This value must be set on exit. A
0 indicates that this syntactic experssion is a lambda closure.
If the body of the lambda cannot return a closure, then
can_return_closure (see below) should be set to 0. When in doubt,
the safe value is 0 with can_return_closure set to 1.
- can_return_closure -- This value must be set on exit. A
0 indicates that this syntactic experssion (or any of its subexpression)
cannot create closure which includes the given environemnt. A 1 indicates
that closure creation is possible. When in doubt, the safe value is
1.
- can_optimize_constants -- This value is set on entry and
does not need to be changed. A 1 indicates that global constants can be
resolved at compiled-time; a 0 indicates that all global references
must be maintained. This flag is usually passed on to
scheme_lookup_value.
In addition, a flag must be set in each compile-time environment frame
in which a value can be changed (via set!) at run-time.

Next: Expander
Up: Compilier
Previous: Compilier
PLT