doc xform Scheme API a provided by Will Farr (PR 10151)

svn: r14242
This commit is contained in:
Matthew Flatt 2009-03-23 18:49:03 +00:00
parent 60e096913d
commit c656a658e9

View File

@ -1,6 +1,8 @@
#lang scribble/doc
@(require scribble/manual
(for-label scheme/base)
(for-label scheme/base
compiler/xform
dynext/compile)
"common.ss")
@(define (xflag str) (as-index (DFlag str)))
@ -55,3 +57,29 @@ loaded into the 3m variant of PLT Scheme. The @as-index{@DFlag{cgc}}
flag specifies that the extension is to be used with the CGC. The
default depends on @|mzc|: @DFlag{3m} if @|mzc| itself is running in
3m, @DFlag{cgc} if @|mzc| itself is running in CGC.
@section[#:tag "xform-api"]{Scheme API for 3m Transformation}
@defmodule[compiler/xform]
@defproc[(xform [quiet? any/c]
[input-file path-string?]
[output-file path-string?]
[include-dirs (listof path-string?)]
[#:keep-lines? keep-lines? boolean? #f])
any/c]{
Transforms C code that is written without explicit GC-cooperation
hooks to cooperate with PLT Scheme's 3m garbage collector; see
@secref[#:doc '(lib "scribblings/inside/inside.scrbl") "overview"] in
@other-manual['(lib "scribblings/inside/inside.scrbl")].
The arguments are as for @scheme[compile-extension]; in addition
@scheme[keep-lines?] can be @scheme[#t] to generate GCC-style
annotations to connect the generated C code with the original source
locations.
The file generated by @scheme[xform] can be compiled via
@scheme[compile-extension].}