home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d5xx
/
d556
/
scheme2c.lha
/
Scheme2C
/
scc.man
< prev
next >
Wrap
Text File
|
1991-10-28
|
8KB
|
264 lines
local SCC(1)
NAME
scc - Scheme to C compiler
SYNTAX
scc [ option ] ... file ...
DESCRIPTION
The scc command invokes a Scheme compiler which accepts the
language defined in the essential portions of _R_e_v_i_s_e_d_3
_R_e_p_o_r_t _o_n _t_h_e _A_l_g_o_r_i_t_h_m_i_c _L_a_n_g_u_a_g_e _S_c_h_e_m_e, with minor con-
straints and some additions. The compiler produces C source
files which are then compiled using the system's C compiler
to produce conventional ._o and _a._o_u_t files. The C code pro-
duced by this compiler may be intermixed with other C code
or code written in other languages.
OPTIONS
These options are accepted by scc. Other options will be
assumed to be options of the system's C compiler and they
will be passed to it when it is invoked.
-cc _C _c_o_m_p_i_l_e_r Compile the Scheme compiler produced C
code with _C _c_o_m_p_i_l_e_r. If this flag is not
supplied, then the C compiler _c_c will be
used.
-C Compile the Scheme programs found in the
files _s_o_u_r_c_e.sc and leave the resulting
code in _s_o_u_r_c_e.c files. No further opera-
tions are performed.
-I _d_i_r_e_c_t_o_r_y Specifies a directory to be searched by
include for source files.
-f _s_y_m_b_o_l _v_a_l_u_e Define the compile-time constant _s_y_m_b_o_l to
_v_a_l_u_e. This is equivilant to the construct
(define-constant _s_y_m_b_o_l _v_a_l_u_e) appearing
in the Scheme source.
-i Combine the source and object files into a
Scheme interpreter. The module name for
each Scheme source file is automatically
determined. Module names for previously
compiled modules must be specified using
the -m option.
-m _m_o_d_u_l_e-_n_a_m_e Specifies the name of a previously com-
piled module. Note that the Scheme com-
piler will downshift the alphabetic char-
acters in the _m_o_d_u_l_e-_n_a_m_e.
1
SCC(1) local
-Ob Optimize code by omitting bounds checks on
vectors and strings.
-Og Optimize code by omitting stack trace-back
code.
-On Optimize code by assuming that all numbers
are fixed point.
-Ot Optimize code by omitting type error
checks.
-pg Produce profiled code for run-time meas-
urement using _g_p_r_o_f(_1). The profiled
library is used in lieu of the standard
Scheme library.
-scgc _s_t_a_t_f_l_a_g Enables garbage collection statistics. If
set to 1, then garbage collection statis-
tics will be printed. The default is 0,
that will result in no statistics.
-sch _h_e_a_p Specifies the compiler's heap size in
megabytes.
-scl _p_e_r_c_e_n_t Specifies the percent of the heap allo-
cated after a generational garbage collec-
tion that will force a full collection.
ENVIRONMENT VARIABLES
The items controlled by -_s_c.. flags can also be controlled
by environment variables. If both the flag and the environ-
ment variable are provided, then the flag's value will be
used.
SCGCINFO Controls the reporting of garbage collec-
tion statistics to the standard error
file. If set to 1, then garbage collec-
tion statistics will be printed. The
default setting is 0 that will not print
the statistics.
SCHEAP Defines the size of the heap in megabytes.
The default heap size is 4 MB.
SCLIMIT Defines the percent of the heap allocated
after a generational garbage collection
that will force a full collection. The
default is 33.
2
local SCC(1)
INPUT FILES
Following the command options come one or more file names.
_n_a_m_e.sc Scheme source. Scheme source files will
be compiled into C files with the name
_n_a_m_e.c.
_n_a_m_e.o Object file which may have been generated
by any compiler.
_n_a_m_e.a Object file archive which may have been
generated by any compiler.
DIAGNOSTICS
The disgnostic messages produced by the compiler are printed
on the standard error file.
FILES
/.../schemetoc/... source and documentation
/.../libsc.a library
/.../libsc_p.a profiled library (optional)
/.../scc c-shell script
/.../sccomp compiler
/.../sccomp.heap saved heap image for the compiler
/.../predef.sc predefined functions
/.../objects.h definitions which are #include'd in the
C code
SC-TO-C_p_r_o_c_e_s_s_i_d.c temporary C source file
SC-TO-C_p_r_o_c_e_s_s_i_d.o temporary object file
LIMITATIONS
When the compiler is able to identify every call to a pro-
cedure, it is able to generate it "in-line", and perform
tail calls by using "goto". This analysis covers most
loops, conditional expressions, and finite state machines.
For non-tail recursive calls, the code generated by the com-
piler uses the standard C mechanisms for procedure call and
return. This therefore requires that each top-level Scheme
procedure, and any Scheme procedure which has more than one
call which is not tail-recursive be compiled into its own C
procedure. Calls to such procedures will be tail-recursive
if and only if the host C compiler optimizes tail-recursion.
SEE ALSO
Harold Abelson and Gerald Jay Sussman with Julie Sussman,
_S_t_r_u_c_t_u_r_e _a_n_d _I_n_t_e_r_p_r_e_t_a_t_i_o_n _o_f _C_o_m_p_u_t_e_r _P_r_o_g_r_a_m_s, The MIT
Press.
Jonathan Rees and William Clinger (Editors), _R_e_v_i_s_e_d_3 _R_e_p_o_r_t
_o_n _t_h_e _A_l_g_o_r_i_t_h_m_i_c _L_a_n_g_u_a_g_e _S_c_h_e_m_e, SIGPLAN Notices, V21,
#12, December 1986.
3
SCC(1) local
R. Kent Dybvig, _T_h_e _S_C_H_E_M_E _P_r_o_g_r_a_m_m_i_n_g _L_a_n_g_u_a_g_e, Prentice
Hall, Inc.
Daniel P. Friedman and Matthias Felleisen, _T_h_e _L_i_t_t_l_e
_L_I_S_P_e_r, MIT Press.
Joel Bartlett, documentation files located in the directory
/.../_s_c_h_e_m_e_t_o_c/....
sci(1)
QUESTIONS, COMMENTS, AND COMPLAINTS
bartlett@decwrl.dec.com
4