previous up next     contents index
Next: Ports Up: Syntax Previous: Examples

Library Functions

 
Scheme_Object *  scheme_make_compiled_syntax(Scheme_Syntax *syntax, 
                         Scheme_Syntax_Expander *exp) 

Creates a Scheme syntax resolver value.

 
void   scheme_register_syntax_executer(char *name, Scheme_Syntax_Compilation *f) 

Maps the given syntax executor to a name, for use in saving and loading compiled MzScheme code to a file.

 
void   scheme_install_type_reader(Scheme_Type type, Scheme_Type_Reader f) 

Installs an unbundler for a Scheme type, usually used for unbundling syntax data that was saved with compiled MzScheme code.

 
void   scheme_install_type_writer(Scheme_Type type, Scheme_Type_Writer f) 

Installs a bundler for a Scheme type, usually used for bundling syntax data to be saved with compiled MzScheme code.

 
Scheme_Object *  scheme_expand(Scheme_Object *form, Scheme_Env *env) 

Expands all macros in the S-expression form using the given global environment.

 
Scheme_Object *  scheme_expand_expr(Scheme_Object *form, Scheme_Env *env, int depth) 

Expands all macros in the S-expression form using the given compile-time environment. If depth > 0, then expansion will proceed for at most depth levels.

 
Scheme_Object *  scheme_expand_list(Scheme_Object *forms, Scheme_Env *env, int depth) 

Expands all macros in the list of S-expression forms using the given compile-time environment. If depth > 0, then expansion will proceed for at most depth levels.

 
Scheme_Object *  scheme_expand_block(Scheme_Object *form, Scheme_Env *env, int depth) 

Expands all macros in the list of S-expression forms using the given compile-time environment. The list forms is the body of a closure, so embedded define, define-struct, and defmacro statements are expanded appropriately. If depth > 0, then expansion will proceed for at most depth levels.

 
Scheme_Object *  scheme_expand_simple(Scheme_Object *form, Scheme_Env *env, 
                        int depth) 

Expands a common syntactic structure: the first S-expression in the list is a synbol which needs no expansion, and the rest of the S-expressions need to be expanded normally.

 
Scheme_Object *  scheme_compile(Scheme_Object *form, Scheme_Env *env) 

Compiles the S-expression form in the given global environement.

 
Scheme_Object *  scheme_compile_expr(Scheme_Object *form, Scheme_Env *env, 
                        Scheme_Compile_Info *rec) 

Compiles the S-expression form in the given compile-time environement. The compilation information in rec is used on entry and adjusted appropriately.

 
Scheme_Object *  scheme_compile_simple(Scheme_Object *form, Scheme_Env *env, 
                        Scheme_Compile_Info *rec) 

Compiles the S-expression form in the given compile-time environement. The compilation information in rec is used only on entry and is not adjusted.

 
Scheme_Object *  scheme_compile_sequence(Scheme_Object *forms, Scheme_Env *env, 
                        Scheme_Compile_Info *rec) 

Compiles the list of S-expressions forms in the given compile-time environement as a sequence of statements to be evaluated in order. The compilation information in rec is used on entry and adjusted appropriately. Since scheme_compile_block is used, embedded defines, etc. are expanded.

 
Scheme_Object *  scheme_compile_block(Scheme_Object *forms, Scheme_Env *env, 
                        Scheme_Compile_Info *rec) 

Compiles the list of S-expressions forms in the given compile-time environement as the body of a closure. The compilation information in rec is used on entry and adjusted appropriately. The return value is a list of compiled expressions.

 
Scheme_Object *  scheme_compile_list(Scheme_Object *form, Scheme_Env *env, 
                        Scheme_Compile_Info *rec) 

Compiles the list of S-expressions forms in the given compile-time environement as independent parallel expressions. The compilation information in rec is used on entry and adjusted appropriately.

 
void   scheme_init_compile_recs(Scheme_Compile_Info *src, 
              Scheme_Compile_Info *dest, int n) 

Initializes an array dest of compilation information structs given prototype struct src. The number of elements in dest is specified by n.

 
void   scheme_merge_compile_recs(Scheme_Compile_Info *final, 
              Scheme_Compile_Info *dest, int n) 

Meregs an array dest of compilation information structs (from parallel subexpressions) into the return structure final. The number of elements in dest is specified by n.

 
Scheme_Object *  scheme_make_syntax_compilation(Scheme_Syntax_Compilation *executor, 
                        Scheme_Object *data) 

Creates a compiled Scheme expression.

 
Scheme_Object *  scheme_make_closure_compilation(Scheme_Env *env,
                         Scheme_Object *uncompiled_code, 
                         Scheme_Compile_Info *rec) 

Compiles a closure expression.

 
Scheme_Object *  scheme_make_compiled_closure(Scheme_Env *env, 
                         Scheme_Object *compiled_code) 

Given an environment and a compiled closure, creates a Scheme closure value.

 
Scheme_Object *  scheme_make_promise_compiled(Scheme_Object *expr,
                        Scheme_Env *env) 

Given a compiled expression and an environment, creates a Scheme promise value.

 
Scheme_Object *  scheme_make_branch_compilation(Scheme_Object *test, 
                        Scheme_Object *tbranch, Scheme_Object *fbranch) 

Given a compiled test expression and two compiled branch expressions, creates a compiled if-expression.

 
Scheme_Object *  scheme_make_sequence_compilation(Scheme_Object *compiled_list, int optimize_values) 

Given a Scheme list of compiled expressions, creates a compiled begin sequence. If optimize_values is 1, constant values that are not the result are left out.


previous up next     contents index
Next: Ports Up: Syntax Previous: Examples

PLT