File: chicken.1

package info (click to toggle)
chicken 2.3-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 26,000 kB
  • ctags: 36,462
  • sloc: ansic: 393,078; lisp: 41,654; sh: 7,989; makefile: 403
file content (455 lines) | stat: -rw-r--r-- 10,691 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
.\" dummy line
.TH CHICKEN 1 "10 Sep 2002"

.SH NAME

Chicken \- A Scheme\-to\-C compiler

.SH SYNOPSIS

.B chicken
.I pathname
[
.I option ...
]

.SH DESCRIPTION

.I Chicken
is a compiler for the programming language
.I Scheme
supporting most of the features as described in the
.I Revised^5 Report on
.I the Algorithmic Language Scheme
\.

.SH OPTIONS

.TP
.B \-analyze\-only
Stop compilation after first analysis pass.

.B \-benchmark\-mode
Equivalent to
.B \-optimize\-level\ 3\ \-fixnum\-arithmetic\ \-disable\-interrupts\ \-lambda\-lift
.B \-block\ \-no\-lambda\-info

.TP
.B \-block
Enable block-compilation. When this option is specified, the compiler assumes that global variables are not modified outside this compilation-unit.

.TP
.B \-case\-insensitive
Enables the reader to read symbols case-insensitive. The default is to read case-sensitive (in violation of R5RS).
This option registers the
.B case\-insensitive
feature identifier.

.TP
.B \-check\-syntax
Aborts compilation process after macro-expansion and syntax checks.

.TP
.B \-compress\-literals\ threshold
Compiles quoted literals that exceed the size 
.BI threshold
as strings
and parse the strings at run-time. This reduces the size of the code and
speeds up compile-times of the host C compiler, but has a small run-time
performance penalty. The size of a literal is computed by counting recursively the objects
in the literal, so a vector counts as 1 plus the count of the elements,
a pair counts as the counts of the car and the cdr, respectively.
All other objects count 1.

.TP
.BI \-database\-size \ number
Specifies the initial size of the analysis-database. Should only be used if extremely large files are to be compiled.

.TP
.BI \-debug \ modes
Enables one or more debugging modes. See the User's Manual for more information.

.TP
.BI \-debug\-level \ level
Selects amount of debug-information. 
.I level
should be an integer.
.P
.br
.B \ \ \ \ 0
-no-trace -no-lambda-info
.br
.B \ \ \ \ 1
-no-trace
.br
.B \ \ \ \ 2
nothing.

.TP
.B \-disable\-c\-syntax\-checks
Disable basic syntax checking of embedded C code fragments.

.TP
.B \-disable\-interrupts
Equivalent to
.B \-prelude\ "(declare\ (interrupts-disabled))"

.TP
.B \-disable\-stack\-overflow\-checks
Disables detection of stack-overflows.

.TP
.B \-dynamic
This option should be used when compiling files intended to be loaded dynamically into
a running Scheme program.

.TP
.BI \-epilogue \ filename
Includes the file named
.I filename
at the end of the compiled source file. 
The include-path is not searched. This option may be given multiple times.

.TP
.I \-emit\-debug\-info
Emit additional information for each 
.B lambda
expression (currently the argument-list,
after alpha-conversion/renaming).

.TP
.I \-emit\-external\-prototypes\-first
Emit prototypes for callbacks defined with 
.B define\-external 
before any
other foreign declarations. This is sometimes useful, when C/C++ code embedded into
the a Scheme program has to access the callbacks. By default the prototypes are emitted
after foreign declarations.

.TP
.B \-explicit\-use
Disables automatic use of the units
.I library
and
.I eval
\. Use this option if compiling a library unit
instead of an application unit.

.TP
.BI \-extend \ filename
Loads a Scheme file before compilation commences. This feature can be used to extend the compiler.

.TP
.B \-extension
Mostly equivalent to 
.B \-prelude\ \'\(define-extension\ NAME\)\'
where 
.B NAME
is the basename of the currently compiled file.

.TP
.BI \-feature \ symbol
Registers
.I symbol
to be a valid feature identifier for
.B cond\-expand

.TP
.B \-ffi
Parse C/C++ code and generate Scheme bindings.

.TP
.BI \-ffi\-define\ symbol
Defines a macro that will be accessible in 
.B foreign\-parse
declarations.

.TP
.BI \-ffi\-include\-path\ path
Set include path for "easy" FFI parser.

.TP
.B \-ffi\-parse
Parse C/C++ code and embed as if wrapped inside a 
.B (declare\ (foreign\-parse\ ...))
form.

.TP
.B \-ffi\-no\-include
Don't parse include files when encountered by the FFI parser.

.TP
.B \-fixnum\-arithmetic
Equivalent to
.B \-prelude\ "(declare\ (fixnum))"

.TP
.BI \-heap\-size \ number
Sets the static heap-size of the generated executable to
.I number
bytes. The parameter may be
followed by a
.B M
or
.B K
suffix which stand for mega- and kilobytes, respectively. The default heap-size is 16 megabytes.

.TP
.BI \-heap\-initial\-size \ number
Sets the size that the heap of the compiled application should have at startup time.

.TP
.BI \-heap\-growth \ percentage
Sets the heap-growth rate for the compiled program at compile time.

.TP
.BI \-heap\-shrinkage \ percentage
Sets the heap-shrinkage rate for the compiled program at compile time.

.TP
.B \-help
Print a summary of available options and the format of the command-line parameters and exit the compiler.

.TP
.BI \-include\-path \ pathname
Specifies an additional search path for files included via the 
.I include
special form. This option may be given multiple times. If the environment variable
.B CHICKEN_INCLUDE_PATH
is set, it should contain a list of alternative include
pathnames separated by
.I \;
\.
The environment variable
.B CHICKEN_HOME
is also considered as a search path.

.TP
.B \-inline
Enables procedure inlining.

.TP
.BI \-inline\-limit threshold
Sets the maximum size of potentially inlinable procedures.

.TP
.BI \-keyword\-style style
Enables alternative keyword syntax, where style may be either
.B prefix
(as in Common Lisp), 
.B suffix
(as in DSSSL) or
.B none
Any other value is ignored. The default is \texttt{suffix}.

.TP
.B \-lambda\-lift
Enable the optimization known as lambda-lifting.

.TP
.B \-no\-trace
Disable generation of tracing information. If a compiled executable should halt due to a runtime error,
then a file containing a stack-trace will be written to the current directory under the name 
.I STACKTRACE
\. Each line in the created file gives the name and the line-number (if available) of a procedure call.
With this option given, the generated code is slightly faster.

.TP
.B \-no\-warnings
Disable generation of compiler warnings.

.TP
.BI \-nursery \ number
.TP
.BI \-stack\-size \ number
Sets the size of the first heap-generation of the generated executable to 
.I number
bytes. The parameter may
be followed by a
.B M
or
.B K
suffix. The default stack-size depends on the target platform.

.TP
.BI \-optimize\-leaf\-routines
Enable leaf routine optimization.

.TP
.BI \-optimize\-level \ level
Enables certain sets of optimization options. 
.I level
should be an integer. Each optimization level corresponds to a certain set of optimization option
as shown in the following list:
.P
.br
.B \ \ \ \ 0
nothing
.br
.B \ \ \ \ 1
-optimize-leaf-routines
.br
.B \ \ \ \ 2
-optimize-leaf-routines -usual-integrations
.br
.B \ \ \ \ 3
-optimize-leaf-routines -usual-integrations -unsafe

.TP
.BI \-output\-file \ filename
Specifies the pathname of the generated C file. Default is 
.I FILENAME.c
\.

.TP
.BI \-postlude \ expressions
Add
.I expressions
after all other toplevel expressions in the compiled file.
This option may be given multiple times. Processing of this option takes place after processing of
.BI \-epilogue
\.

.TP
.BI \-prelude \ expressions
Add
.I expressions
before all other toplevel expressions in the compiled file.
This option may be given multiple times. Processing of this option takes place before processing of
.B \-prologue
\.

.TP
.B \-profile
.B \-accumulate\-profile
Instruments the source code to count procedure calls and execution times. After the program terminates
(either via an explicit 
.B exit
or implicitly), profiling statistics are written to a file named
.B PROFILE
Each line of the generated file contains a list with the procedure name,
the number of calls and the time spent executing it. Use the script 
.B formatprofile
to display the profiling information in a more user-friendly form.

.TP
.BI \-prologue \ filename
Includes the file named 
.I filename
at the start of the compiled source file. 
The include-path is not searched. This option may be given multiple times.

.TP
.B \-quiet
Disables output of compile information.

.TP
.BI \-require\-extension \ name
Loads the syntax-extension
.I name
before the source program is processed. This is identical to adding 
.B require\-extension\ NAME
at the start of
the compiled program.

.TP
.B \-run\-time\-macros
Makes low-level macros (defined with 
.B define\-macro
also available at run-time. By default
low-level macros are not available at run-time. Note that highlevel-macros ("syntax-case")
 defined in compiled code are never available at run-time.

.TP
.BI \-split\ number
Split output into several C files. So for a source file named
.I name
the compiler will generate C files named
.I name0\,
.I \.\.\.\,
.I nameN\-1

.TP
.BI \-split\-level\ number
Specifies how hard the partitioning algorithm should work (should be 0, 1 or 2).

.TP
.B \-to\-stdout
Write compiled code to standard output instead of creating a
.I .c
file.

.TP
.BI \-unit \ name
Compile this file as a library unit.

.TP
.B \-unsafe
Disable runtime safety checks.

.TP
.B \-unsafe\-libraries
Marks the generated file for being linked with the unsafe runtime system. This
should be used when generating shared object files that are to be loaded
dynamically. If the marker is present, any attempt to load code compiled with
this option will signal an error.

.TP
.BI \-uses \ name
Use definitions in the given library unit.

.TP
.B \-usual\-integrations
Specifies that standard procedures and certain internal procedures are never redefined, and can
be inlined. This is equivalent to declaring 
.I (usual\-integrations)
\.

.TP
.B \-verbose
Prints progress information to standard output during compilation.

.TP
.B \-version
Prints the version and some copyright information and exit the compiler.

.SH ENVIRONMENT\ VARIABLES

.TP
.B CHICKEN_HOME
Should contain the pathname where support- and include-files can be found.

.TP
.B CHICKEN_INCLUDE_PATH
Contains one or more pathnames where the compiler should additionally look for include-files, separated by 
.B \;
characters.

.TP
.B CHICKEN_OPTIONS
Holds a string of default compiler options that should apply to every invocation of
.B chicken
\.

.SH DOCUMENTATION

More information can be found in the
.I Chicken\ Manual
which is provided in HTML format as
.B /usr/share/doc/chicken-bin/chicken\.html
in the distribution.

.SH BUGS

Submit bug reports by e-mail to
.I felix@call-with-current-continuation.org

.SH AUTHOR

.I Chicken
was implemented by Felix L. Winkelmann (felix@call-with-current-continuation.org).

.SH SEE ALSO

.BR csc(1)
.BR chicken-config(1)