📄 chicken.texi
字号:
@end table@verbatim -debug-level 0 is equivalent to -no-trace -no-lambda-info -debug-level 1 is equivalent to -no-trace -debug-level 2 does nothing (the default)@end verbatim@table @b@item -disable-interruptsEquivalent to the @code{(disable-interrupts)} declaration. No interrupt-checks are generated for compiled programs.@item -disable-compiler-macrosdisable expansion of compiler macros.@item -disable-stack-overflow-checksDisables detection of stack overflows. This is equivalent to running the compiled executable with the @code{-:o} runtime option.@item -disable-warning CLASS : Disables specific class of warnings, may be given multiple times. The following classes are defined@end table@verbatim usage warnings related to command-line arguments type warnings related to type-conversion ext warnings related to extension libraries var warnings related to variable- and syntax-definitions and use const warnings related to constant-definitions syntax syntax-related warnings redef warnings about redefinitions of standard- or extended-bindings call warnings related to known procedure calls ffi warnings related to the foreign function interface@end verbatim@table @b@item -dynamicThis option should be used when compiling files intended to be loaded dynamically into a running Scheme program.@item -epilogue FILENAMEIncludes the file named @code{FILENAME} at the end of the compiled source file. The include-path is not searched. This option may be given multiple times.@item -emit-exports FILENAMEWrite exported toplevel variables to @code{FILENAME}.@item -emit-external-prototypes-firstEmit prototypes for callbacks defined with @code{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.@item -explicit-useDisables automatic use of the units @code{library, eval} and @code{extras}. Use this option if compiling a library unit instead of an application unit.@item -extend FILENAMELoads a Scheme source file or compiled Scheme program (on systems that support it) before compilation commences. This feature can be used to extend the compiler. This option may be given multiple times. The file is also searched in the current include path and in the extension-repository.@item -extensionMostly equivalent to @code{-prelude '(define-extension <NAME>)'}, where @code{<NAME>} is the basename of the currently compiled file. Note that if you want to compile a file as a normal (dynamically loadable) extension library, you should also pass the @code{-shared} option.@item -feature SYMBOLRegisters @code{SYMBOL} to be a valid feature identifier for @code{cond-expand}. Multiple symbols may be given, if comma-separated.@item -fixnum-arithmeticEquivalent to @code{(fixnum-arithmetic)} declaration. Assume all mathematical operations use small integer arguments.@item -heap-size NUMBERSets a fixed heap size of the generated executable to @code{NUMBER} bytes. The parameter may be followed by a @code{M} (@code{m}) or @code{K} (@code{k}) suffix which stand for mega- and kilobytes, respectively. The default heap size is 5 kilobytes. Note that only half of it is in use at every given time.@item -heap-initial-size NUMBERSets the size that the heap of the compiled application should have at startup time.@item -heap-growth PERCENTAGESets the heap-growth rate for the compiled program at compile time (see: @code{-:hg}).@item -heap-shrinkage PERCENTAGESets the heap-shrinkage rate for the compiled program at compile time (see: @code{-:hs}).@item -helpPrint a summary of available options and the format of the command line parameters and exit the compiler.@item -import FILENAMERead exports from linked or loaded libraries from given file. See also @code{-check-imports}. This is equivalent to declaring @code{(declare (import FILENAME))}. Implies @code{-check-imports}.@item -include-path PATHNAMESpecifies an additional search path for files included via the @code{include} special form. This option may be given multiple times. If the environment variable @code{CHICKEN_INCLUDE_PATH} is set, it should contain a list of alternative include pathnames separated by @code{;}.@item -inlineEnable procedure inlining for known procedures of a size below the threshold (which can be set through the @code{-inline-limit} option).@item -inline-limit THRESHOLDSets the maximum size of a potentially inlinable procedure. The default threshold is @code{10}.@item -keyword-style STYLEEnables alternative keyword syntax, where @code{STYLE} may be either @code{prefix} (as in Common Lisp), @code{suffix} (as in DSSSL) or @code{none}. Any other value is ignored. The default is @code{suffix}.@item -keep-shadowed-macrosDo not remove macro definitions with the same name as assigned toplevel variables (the default is to remove the macro definition).@item -lambda-liftEnable the optimization known as lambda-lifting.@item -no-lambda-infoDon't emit additional information for each @code{lambda} expression (currently the argument-list, after alpha-conversion/renaming).@item -no-traceDisable generation of tracing information. If a compiled executable should halt due to a runtime error, then a list of the name and the line-number (if available) of the last procedure calls is printed, unless @code{-no-trace} is specified. With this option the generated code is slightly faster.@item -no-warningsDisable generation of compiler warnings.@item -nursery NUMBER@item -stack-size NUMBERSets the size of the first heap-generation of the generated executable to @code{NUMBER} bytes. The parameter may be followed by a @code{M} (@code{m}) or @code{K} (@code{k}) suffix. The default stack-size depends on the target platform.@item -optimize-leaf-routinesEnable leaf routine optimization.@item -optimize-level LEVELEnables certain sets of optimization options. @code{LEVEL} should be an integer.@end table@verbatim -optimize-level 0 does nothing. -optimize-level 1 is equivalent to -optimize-leaf-routines -optimize-level 2 is currently the same as -optimize-level 1 -optimize-level 3 is equivalent to -optimize-leaf-routines -unsafe@end verbatim@table @b@item -output-file FILENAMESpecifies the pathname of the generated C file. Default is @code{FILENAME.c}.@item -postlude EXPRESSIONSAdd @code{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 @code{-epilogue}.@item -prelude EXPRESSIONSAdd @code{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 @code{-prologue}.@item -profile@item -accumulate-profileInstruments the source code to count procedure calls and execution times. After the program terminates (either via an explicit @code{exit} or implicitly), profiling statistics are written to a file named @code{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 @code{chicken-profile} program to display the profiling information in a more user-friendly form. Enter @code{chicken-profile} with no arguments at the command line to get a list of available options. The @code{-accumulate-profile} option is similar to @code{-profile}, but the resulting profile information will be appended to any existing @code{PROFILE} file. @code{chicken-profile} will merge and sum up the accumulated timing information, if several entries for the same procedure calls exist.@item -profile-name FILENAMESpecifies name of the generated profile information (which defaults to @code{PROFILE}. Implies @code{-profile}.@item -prologue FILENAMEIncludes the file named @code{FILENAME} at the start of the compiled source file. The include-path is not searched. This option may be given multiple times.@item -quietDisables output of compile information.@item -rawDisables the generation of any implicit code that uses the Scheme libraries (that is all runtime system files besides @code{runtime.c} and @code{chicken.h}).@item -require-extension NAMELoads the extension @code{NAME} before the compilation process commences. This is identical to adding @code{(require-extension NAME)} at the start of the compiled program. If @code{-uses NAME} is also given on the command line, then any occurrences of @code{-require-extension NAME} are replaced with @code{(declare (uses NAME))}. Multiple names may be given and should be separated by @code{,}.@item -run-time-macrosMakes macros also available at run-time. By default macros are not available at run-time.@item -to-stdoutWrite compiled code to standard output instead of creating a @code{.c} file.@item -unit NAMECompile this file as a library unit. Equivalent to @code{-prelude "(declare (unit NAME))"}@item -unsafeDisable runtime safety checks.@item -unsafe-librariesMarks 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.@item -uses NAMEUse definitions from the library unit @code{NAME}. This is equivalent to @code{-prelude "(declare (uses NAME))"}. Multiple arguments may be given, separated by @code{,}.@item -no-usual-integrationsSpecifies that standard procedures and certain internal procedures may be redefined, and can not be inlined. This is equivalent to declaring @code{(not usual-integrations)}.@item -versionPrints the version and some copyright information and exit the compiler.@item -verbosePrints progress information to standard output during compilation.@end tableThe environment variable @code{CHICKEN_OPTIONS} can be set to a string with default command-line options for the compiler.@node Using the compiler - Runtime options, Using the compiler - Examples, Using the compiler - Compiler command line format, Using the compiler@section Runtime optionsAfter successful compilation a C source file is generated and can be compiled with a C compiler. Executables generated with CHICKEN (and the compiler itself) accept a small set of runtime options:@table @b@item @code{-:?}Shows a list of the available runtime options and exits the program.@item @code{-:aNUMBER}Specifies the length of the buffer for recording a trace of the last invoked procedures. Defaults to 16.@item @code{-:b}Enter a read-eval-print-loop when an error is encountered.@item @code{-:B}Sounds a bell (ASCII 7) on every major garbage collection.@item @code{-:c}Forces console mode. Currently this is only used in the interpreter (@code{csi}) to force output of the @code{#;N>} prompt even if stdin is not a terminal (for example if running in an @code{emacs} buffer under Windows).@item @code{-:d}Prints some debug-information at runtime.@item @code{-:D}Prints some more debug-information at runtime.@item @code{-:fNUMBER}Specifies the maximal number of currently pending finalizers before finalization is forced.@item @code{-:hNUMBER}Specifies fixed heap size@item @code{-:hgPERCENTAGE}Sets the growth rate of the heap in percent. If the heap is exhausted, then it will grow by @code{PERCENTAGE}. The default is 200.@item @code{-:hiNUMBER}Specifies the initial heap size@item @code{-:hmNUMBER}Specifies a maximal heap size. The default is (2GB - 15).@item @code{-:hsPERCENTAGE}Sets the shrink rate of the heap in percent. If no more than a quarter of @code{PERCENTAGE} of the heap is used, then it will shrink to @code{PERCENTAGE}. The default is 50. Note: If you want to make sure that the heap never shrinks, specify a value of @code{0}. (this can be useful in situations where an optimal heap-size is known in advance).@item @code{-:o}Disables detection of stack overflows at run-time.@item @code{-:r}Writes trace output to stderr. This option has no effect with in files compiled with the @code{-no-trace} options.@item @code{-:sNUMBER}Specifies stack size.@item @code{-:tNUMBER}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -